Undefined Main Symbol
Undefined Main Symbol
- Subject: Undefined Main Symbol
- From: "Balajee R.C" <email@hidden>
- Date: Tue, 1 Jun 2010 10:16:42 +0530
I am running into the following linker error when trying to build a certain open source program:
Ld build/Debug/LincityNG3D.app/Contents/MacOS/LincityNG3D normal x86_64
cd /Users/balajeerc/Projects/LinCityNG/3d/LinCityNG3d
/Developer/usr/bin/g++-4.2 -arch x86_64 -L/Users/balajeerc/Projects/LinCityNG/3d/LinCityNG3d/build/Debug -L/opt/local/lib -F/Users/balajeerc/Projects/LinCityNG/3d/LinCityNG3d/build/Debug -F/opt/local/Library/Frameworks -filelist /Users/balajeerc/Projects/LinCityNG/3d/LinCityNG3d/build/LincityNG3D.build/Debug/LincityNG3D.build/Objects-normal/x86_64/LincityNG3D.LinkFileList -framework Foundation -framework AppKit -framework SDL_ttf -framework SDL -lphysfs -lxml2 -framework OpenGL -lSDL_gfx -lSDL_image -lSDL_mixer -lz -o /Users/balajeerc/Projects/LinCityNG/3d/LinCityNG3d/build/Debug/LincityNG3D.app/Contents/MacOS/LincityNG3D
Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I have already checked the following:
1) That the file containing definition of main has been compiled successfully and that the object binary of the same is listed in the LinkFileList specified.
2) extern "C" has been used on main in case the compiler is unable to find the symbol in symbol table for the project thats mostly C++ code.
I am code-pasting the rather long compiler flags externally to keep the post readable:
http://www.pasteall.org/13491I'd be grateful if someone can tell me what else I need to check for that might be possibly causing this error.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden