Victor Hernandez
Victor Hernandez

Reputation: 43

compile object code in linux error (.text+0x20): undefined reference to `main'

im triying to compile a object from the source http://xeat-engine.googlecode.com/svn/trunk/ using the code

g++ -c wx-config --cxxflags main.cpp

g++ -o main main.o wx-config --libs

and obtain the error

/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function _start': (.text+0x20): undefined reference tomain'

collect2: error: ld returned 1 exit status

please help me to fix the problem What could I do? IS A CAPTURE FOR MAIN.CPP

https://i.sstatic.net/TziYb.jpg

Upvotes: 0

Views: 846

Answers (1)

polarysekt
polarysekt

Reputation: 572

You're missing:

wxIMPLEMENT_APP(xeatengine_guiApp);

which will be expanded into a valid main() function.

NOTE: the trailing semicolon is necessary...

See also:

wxDECLARE_APP(xeatengine_guiApp);

Upvotes: 1

Related Questions