假设您在
Linux服务器上准备好了.h和.m,那么您会向GCC发出哪个命令来编译它?
解决方法
相关部分:
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.
有关更多信息,请参见此link.
Try installing either gobjc++ or gobjc
sudo apt-get install gobjc++