Linking Objective-C project on Windows
i have compiled t开发者_高级运维wo classes (Etudiant.m) and (main.m) and i obtain successufully the two .o files (Etudiant.o) and (main.o). However when linking with this command :
gcc -c -o prog -Wno-import Etudiant.o main.o -lobjc
i got this :
gcc.exe : Etudiant.o : linker input file unused because linking not done
gcc.exe : main.o : linker input file unused because linking not done
can anybody help me to find out how to solve linking issues ?? THX in advance.
Don't use -c
. That tells the gcc frontend not to perform the linking. So, instead of
gcc -c -o prog -Wno-import Etudiant.o main.o -lobjc
just do
gcc -o prog -Wno-import Etudiant.o main.o -lobjc
精彩评论