Boost logo

Boost Users :

From: frederic.bron_at_[hidden]
Date: 2007-07-07 02:29:22


I may have done an error the first time I tried <cflags>-DBOOST_POSIX_API because I tried again and it works!

Here is the user-config.jam file for cygwin :

using gcc : : : <cflags>-DBOOST_POSIX_API <cxxflags>-DBOOST_POSIX_API <compilerflags>-DBOOST_POSIX_API <linkflags>-DBOOST_POSIX_API ;

Here is the user-config.jam file for no-cygwin :

using gcc : : : <cflags>-mno-cygwin <cflags>-DBOOST_WINDOWS_API <cxxflags>-mno-cygwin <cxxflags>-DBOOST_WINDOWS_API <compilerflags>-mno-cygwin <compilerflags>-DBOOST_WINDOWS_API <linkflags>-mno-cygwin
<linkflags>-DBOOST_WINDOWS_API ;

F. Bron

                                                                                                                                                                               
                      frederic.bron_at_[hidden]
                      Envoyé par : Pour : boost-users_at_[hidden]
                      boost-users-bounces_at_list cc : (ccc : Frederic Bron/Alcan)
                      s.boost.org Objet : [Boost-users] [filesystem] building for cygwin
                                                                                                                                                                               
                                                                                                                                                                               
                      06/07/2007 19:28
                      Veuillez répondre à
                      boost-users
                                                                                                                                                                               

In the documentation, it is written what follows for compiling with cygwin. Basically set BOOST_POSIX_API when building for cygwin and BOOST_WINDOWS_API when building for windows (i.e. -mno-cygwin).
My question is: how to set BOOST_POSIX_API in user-config.jam? I have tried <define>BOOST_POSIX_API but it did not work. I have tried <cflags>-DBOOST_POSIX_API <cxxflags>-DBOOST_POSIX_API... and the
-DBOOST_POSIX_API is given to g++ but I still have the windows behaviour.

For example cout << boost::filesystem::path("/cygdrive/c/toto").file_string() ; gives \cygdrive\c\toto.

Can you help to get the POSIX behaviour when compiling without "-mno-cygwin"?

Regards,

F. Bron

The library's implementation code automatically detects the current platform, and compiles the POSIX or Windows implementation code accordingly. Automatic platform detection during object library
compilation can be overridden by defining either BOOST_POSIX_API or BOOST_WINDOWS_API macros. With the exception of the Cygwin environment, there is usually no reason to define these macros, as the
software development kits supplied with most compilers only support a single platform.

The Cygwin package of tools supports traditional Windows usage, but also provides an emulation layer and other tools which can be used to make Windows act as Linux (and thus POSIX), and provide the
Linux look-and-feel. GCC is usually the compiler of choice in this environment, as it can be installed via the Cygwin install process. Other compilers can also use the Cygwin emulation of POSIX, at
least in theory.

Those wishing to use the Cygwin POSIX emulation layer should define the BOOST_POSIX_API macro when compiling bother user programs and the Boost.Filesystem's object-library.

Avis :
Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le
détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes
en tout ou en partie.

Notice:
This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error
please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net