[Top][All Lists]

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

Re: header check, cross compiling and compiler version?

From: aaragon
Subject: Re: header check, cross compiling and compiler version?
Date: Sat, 22 Mar 2008 09:10:57 -0700 (PDT)

Peter O'Gorman wrote:
> aaragon wrote:
>> Hi everyone,
>> I used to write c++ code in Ubuntu Linux, and then I started working on
>> Mac
>> OS so I had to transfer all my c++ code to the new system. My first task
>> was
>> to get a newer compiler than the one that is shipped by default with
>> Leopard
>> so using macports I compiled GCC v4.3. Now, for my surprise, most of my
>> code
>> didn't compile because it seems that the hash_set and hash_map
>> (previously
>> found under the ext/ directory) now became unordered_set and
>> unordered_map,
>> so I guess they are standard.
> I don't really understand the need to install a different compiler, the
> gcc-4.x that ships with Xcode-3.0 is good enough for most Mac OS X
> developers, and has quite a number of APPLE_LOCAL patches that you will
> not find in upstream fsf gcc.
>> So, I had not only the header problem, but also the compiler version and
>> the
>> OS is different as well. I was using autotools before, but I didn't have
>> all
>> these checks. Honestly, I don't know how to solve these problems. I still
>> need to compile the code on Linux machines, but then I have to #define a
>> variable for the  different headers. It would be nice if one could detect
>> the system type, and then add directories to the search for headers. I
>> couldn't find anything that accomplishes this so I was wondering if it is
>> possible. For example, if I am in a Darwin OS, I could add directories
>> /opt/local/include (macports) or /sw/include (fink) to the search. Is
>> there
>> a way to do this using autoconf?
>> What is the best approach to take in these cases? Do you define
>> parameters
>> in config.h for later use for each OS, compiler version? Please help, I'm
>> really lost,
> Usually setting CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib
> at configure time is sufficient. It is also possible to do this with gcc
> env vars LIBRARY_PATH and CPATH.
> Does this answer your question?
> Peter
> -- 
> Peter O'Gorman
> _______________________________________________
> Autoconf mailing list
> address@hidden

Well, the compiler version in the last Darwin is 4.0, and I've been using
v4.2 in Linux. I had a lot of errors when I ported my code and instead of
trying to find those, I just compiled a newer version of GCC. I'm not
building MAC applications, and I'm using a lot of GNU open source. Thanks
for replying.

View this message in context:
Sent from the Gnu - Autoconf - General mailing list archive at

reply via email to

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