开发者

compiling *.h files in objective c Linux

开发者 https://www.devze.com 2023-01-28 05:03 出处:网络
Im learning objective C (using a mac in my work) Inmy house I only have a Linux box, I\'m using it to compile the objective c,

Im learning objective C (using a mac in my work) In my house I only have a Linux box, I'm using it to compile the objective c, so far its been a good path, but now, I got to the stage of using the interface *.h file in a different file than the *.m, I was u开发者_如何学运维sing

gcc `gnustep-config --objc-flags` -lgnustep-base 6_header.m -o 6_header

to compile the programs for testing, but it doesnt work it a separate .h file, what to add? or change?

thank you!


Your .h file should get included correctly from the .m. Just make sure the .m has #import "some_file.h".

Also, just like in regular C, the .h should be in the same directory. If not, you can pass -I/some/other/path to look for .h's inside /some/other/path

0

精彩评论

暂无评论...
验证码 换一张
取 消