mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] [PATCH cleanup] upgrade packages glib gtk


From: Volker Grabsch
Subject: Re: [Mingw-cross-env-list] [PATCH cleanup] upgrade packages glib gtk
Date: Wed, 28 Apr 2010 10:54:19 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Mark Brand <address@hidden> schrieb:
> Would it be better to use -isystem instead of -I for the include 
> directory used in the native glib build? If I understand correctly, this 
> should ensure that "#include <iconv.h>" gets the file from 
> $(1).native/$(libiconv_SUBDIR)/include instead of the standard system 
> include directory.

I don't think this is necessary, and I never thought this would be
necessary because that would create lots of problems in other tools.

So here is a quick experiment that shows why "-I" works perfectly
as intended:

-------------------------------------------------------------------

$ ls -la /usr/include/iconv.h 

    | -rw-r--r-- 1 root root 1949 Jan 14 07:46 /usr/include/iconv.h

$ cat iconv.h

    | #define MY_CONSTANT 0

$ cat test.c

    | #include <iconv.h>
    |
    | int main(int argc, char **argv) 
    | {
    |     return MY_CONSTANT;
    | }

$ gcc test.c

    | test.c: In function 'main':
    | test.c:4: error: 'MY_CONSTANT' undeclared (first use in this function)
    | test.c:4: error: (Each undeclared identifier is reported only once
    | test.c:4: error: for each function it appears in.)

$ gcc -I. test.c

    | (no output, simply works)

$ ./a.out

    | (no output, simply works)

$ gcc test.c -I.

    | (no output, simply works)

-------------------------------------------------------------------


Greets,

    Volker

-- 
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR




reply via email to

[Prev in Thread] Current Thread [Next in Thread]