This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc header file help should be a minor problem


On 2007-09-20 22:25Z, patrickinminneapolis wrote:
> 
> This works fine : 
> gcc -c -fpic example.c example_wrap.c

I thought that'd give a (harmless) warning about '-fpic', but anyway...

> But I want to include files in a different directory, so just to test, I
> moved example_wrap.c to c:\ , i tested
> gcc -c -fpic -I/cygdrive/c/ example.c example_wrap.c  //failed (couldn't
> find example_wrap.c)

'-I' is for finding headers named in an #include directive. But
'example_wrap.c' is a source file, not a header, so do this:

gcc -c example.c /cygdrive/c/example_wrap.c

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]