   SDL 1.2 OSX duplicate symbol!
  Hello,I have been trying to solve this error for the past 3 days with no luck. I have made a bare-bones application using SDL 1.2 on Netbeans (OSX). I have included of course SDLmain.m in the project, and added the linker flag for it in the Netbeans settings.The build output is as follows:/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf/usr/bin/make  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/mazoxasmkdir -p build/Debug/GNU-MacOSXrm -f build/Debug/GNU-MacOSX/SDLMain.o.dgcc -m32   -c -g -Iinclude -MMD -MP -MF build/Debug/GNU-MacOSX/SDLMain.o.d -o build/Debug/GNU-MacOSX/SDLMain.o SDLMain.mmkdir -p dist/Debug/GNU-MacOSXg++ -m32    -m32 -framework SDL -framework Cocoa -framework OpenGL -o dist/Debug/GNU-MacOSX/mazoxas build/Debug/GNU-MacOSX/SDLMain.o build/Debug/GNU-MacOSX/main.o SDLmain.m ld: duplicate symbol .objc_category_name_NSApplication_SDLApplication in /var/folders/qA/qA7ADVuFGuyf2rspH91eH++++TI/-Tmp-//cccf4Ej3.o and build/Debug/GNU-MacOSX/SDLMain.ocollect2: ld returned 1 exit statusmake[2]: *** [dist/Debug/GNU-MacOSX/mazoxas] Error 1make[1]: *** [.build-conf] Error 2make: *** [.build-impl] Error 2BUILD FAILED (exit value 2, total time: 4s)My program just uses an int main(int argc, char** argv).Can someone help me please?Thank you.   
Quote:gcc -m32   -c -g -Iinclude -MMD -MP -MF build/Debug/GNU-MacOSX/SDLMain.o.d -o build/Debug/GNU-MacOSX/SDLMain.o SDLMain.mFirst you are compiling SDLMain.m to produce SDLMain.o...Quote:g++ -m32    -m32 -framework SDL -framework Cocoa -framework OpenGL -o dist/Debug/GNU-MacOSX/mazoxas build/Debug/GNU-MacOSX/SDLMain.o build/Debug/GNU-MacOSX/main.o SDLmain.mAnd then you both link with the compiled SDLMain.o, *and* compile in a fresh version of SDLMain.m.Either just use the SDLMain.o which you compiled first, or better yet, eliminate the first step entirely, and just use SDLMain.m.   ;  Thank you for the fast reply,I forgot to exclude the .h and .m files from the project. Okay, it works as a charm now, thanks man.   