you are trying to write a pure obj-c file, without gnustep, when you
use objc.h.
Instead, when you use Foundation.h, you are accessing the
Foundation, part of Openstep /Cocoa.
For the latter, the most convenient way is to write and use a
gnustep makefile. Everything is set up for you already then. Please
try with that, so you get hands on. Afterwards, if you feel the need
to strip down, you may try yourself the hassle of setting up
everything for yourself. But, honestly, it is not worth the trouble
usually.
For a command line program (like hello world) use "Tool" as a
reference.
I am a noob in GNUstep and I am trying to compile my first
objective-c file.
This is going to be a quite long email, since I will try to
describe in as many details as I can the installation process I
did.
I am using a Windows environment, so I downloaded GNUstep MSYS
System version 0.29.0 and installed, with default path, in my
computer. After that, I installed GNUstep Core version 0.29.0,
with default configurations as well. Just to be on the safe side,
I installed, then, GNUstep Devel version 1.4.0, with default
configurations too.
Then I went to the Start menu and launched the Shell software.
After that, I decided it was better to test the install, I wrote
the following code:
#include <stdio.h>
//Now, testing the Objective-c libraries.
#include <objc/objc.h>
int main (void)
{
prinf("All right and ready to go!");
return(0);
}
And I got an error saying "objc/objc.h: No such file or
directory". I tried with "#include
<Foundation/Foundation.h>" as well and I got the same error,
just with instead "objc/objc.h" it was written
"Foundation/Foundation.h".
Then, I tried to find the header files inside GNUstep and could
not find it. After some exploration, I found that my / folder is
under C:\GNUstep\msys\1.0\ and the headers are under
C:\GNUstep\GNUstep\System\Library\Headers\objc, so I have no
visibility to objc.h, Foundation.h or any other header, so I can't
use any arguments to show gcc where to look for the files.
Do anyone know what can I do to solve my problem? I am sorry to
have made such an enourmous email, but I am trying to compile my
code for quite a while now and looking around for the solution of
my problem without result, and been getting increasingly
frustrated.