Reputation: 96541
Assuming you have your .h
and .m
ready on a Linux server, which command would you issue to GCC
to have it compiled?
Upvotes: 7
Views: 4782
Reputation: 19897
The relevant parts:
gcc -c -Wno-import List.m
gcc -o prog -Wno-import List.o main.o -lobjc
. . . make sure that the Objective-C library and header files (objc/Object.h) were installed when gcc was built.
Note that when linking Objective-C with gcc, you need to specify the Objective-C library by using the -lobjc switch.
See this link for more information.
Additional link with possible solution to the missing compiler issue:
Try installing either gobjc++ or gobjc
sudo apt-get install gobjc++
Upvotes: 9