GCC Missing Header File

kainjow

Registered
I'm trying to compile some code in cygwin in Windows, and it's trying to include <ar.h>. This header exists at /usr/include/ but GCC doesn't see it, it just says
ar.h: No such file or directory
I tested the exact same code on my Mac and it worked fine:
#include <ar.h>
int main()
{
return 0;
}
Is there something I have to do in GCC or somewhere else to let it know about this header?
 
Hi Kainjow,

You might have done this already but in Xcode menu go to Project --> Edit Project then scroll down until you find 'Header Search Path', edit this string to the directory you want to include.

Daniel
 
The problem isn't on my Mac, it's on Windows, using cygwin, which creates a Linux/unix like environment for compiling code on Windows.
 
Ohh! Sorry didn't read that properly.

Is cygwin a application?

I was thinking of duelbooting my windows machine at work into linux and mess around with compiling my app with gnustep. There is not GUI and I'm just using a few foundation framework class and normal objective-c. You see I've run into a bit problem with GCC apparently treating long double type as double which means I can't use the long double function from the math.h library, e.g. sinhl() expl() etc.
 
Do you need to pass the location of hte ar.h file using the -I flag?

gcc file.c -o file.exe -I/location/of/header/files/
 
Well I did eventually replace the #include <ar.h> with the actual contents of the file, but I ran into tons of other problems compiling the source in cygwin that I gave up. The one problem is I needed GCC 4 and that's just not available yet for cygwin (I tried compiling GCC 4 with GCC 3, but ahh so many problems) :D
 
Back
Top