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: g++ defines for win32



Angel Tsankov
fn42551@fmi.uni-sofia.bg
----- Original Message ----- From: "Angel Tsankov" <fn42551@fmi.uni-sofia.bg>
To: "Pavel Tsekov" <ptsekov@gmx.net>
Cc: "cygwin mailing list" <cygwin@cygwin.com>
Sent: Monday, August 15, 2005 5:37 PM
Subject: Re: g++ defines for win32



----- Original Message ----- From: "Pavel Tsekov" <ptsekov@gmx.net>
To: "Angel Tsankov" <fn42551@fmi.uni-sofia.bg>
Cc: "cygwin mailing list" <cygwin@cygwin.com>
Sent: Monday, August 15, 2005 3:04 PM
Subject: Re: g++ defines for win32



Hello,

On Mon, 15 Aug 2005, Angel Tsankov wrote:

Here's the test case. Execute the run.bat file to perform the test.
Hmm, it seams that I cannot send zip files as attachments. So you may
download the test case from
http://debian.fmi.uni-sofia.bg/~angel/test_case.zip
and run run.bat to execute it.

The description of `CPATH', `C_INCLUDE_PATH', `CPLUS_INCLUDE_PATH' and `OBJC_INCLUDE_PATH' from the gcc info manual says:

[...]
`CPATH' specifies a list of directories to be searched as if
specified with `-I', but after any paths given with `-I' options
on the command line. This environment variable is used regardless
of which language is being preprocessed.


The remaining environment variables apply only when preprocessing
the particular language indicated. Each specifies a list of
directories to be searched as if specified with `-isystem', but
after any paths given with `-isystem' options on the command line.
[...]


The cause of the warnings that you see is that by the time defs.h is
parsed (last in the search path) some system header file already defined
the symbols __cdecl, __stdcall and __fastcall. So what are you looking for
is not `CPLUS_INCLUDE_PATH' but `CPATH'. Obviously you also have to fix
your include file to behave properly when __cdecl, __stdcall and
__fastcall are already defined.


--
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/


I think I fixed my code. Thanks!

Now, I have the following notices to make.

The gcc manual also says:
[...]
CPATH
C_INCLUDE_PATH
CPLUS_INCLUDE_PATH
OBJC_INCLUDE_PATH
Each variable's value is a list of directories separated by a special character, much like PATH, in which to look for header files. The special character, PATH_SEPARATOR, is target-dependent and determined at GCC build time. For Microsoft Windows-based targets it is a semicolon, and for almost all other targets it is a colon.
[...]


As far as I can get this, it implies that the environment variables mentioned there should contain semicolon separated folders. This is on Microsoft Windows. And right on that platform I have to use colon separated folders for these variables to work at all. I know that this is might seem a little off-topic at first, but from my point of view it is not - both problems relate to the CPLUS_INCLUDE_PATH variable.

And finally, your suggestion about using CPATH instead of CPLUS_INCLUDE_PATH just does NOT work You could check this yourself.

Well, it turns out your suggestion to use CPATH instead of CPLUS_INCLUDE_PATH is a good one.
Just CPATH does not do what I at first expected.



Besh wishes, Angel Tsankov fn42551@fmi.uni-sofia.bg

--
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/





--
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]