
I am using boost 1.34.0 I have built the boost libraries from cygwin but for no-cygwin environment (pure win32, independant from cygwin): - I have built bjam with: ./build.bat gcc-nocygwin - I have used bjam like this: path/to/bjam link=static threading=single runtime-link=shared --toolset=gcc-nocygwin --prefix="D:\Softs\boost_msw" --layout=system release install - I then use g++ with -mno-cygwin flag to compile and link Here is the trouble I get when I link a program that uses regex with the regex library: /cygdrive/d/Softs/boost_msw/lib/libboost_regex.a(static_mutex.o):static_mutex.cpp:(.text+0x1a): r'ef'erence ind'efinie vers << _pthread_mutex_lock >> /cygdrive/d/Softs/boost_msw/lib/libboost_regex.a(static_mutex.o):static_mutex.cpp:(.text+0x54): r'ef'erence ind'efinie vers << _pthread_mutex_lock >> /cygdrive/d/Softs/boost_msw/lib/libboost_regex.a(static_mutex.o):static_mutex.cpp:(.text+0x84): r'ef'erence ind'efinie vers << _pthread_mutex_lock >> /cygdrive/d/Softs/boost_msw/lib/libboost_regex.a(static_mutex.o):static_mutex.cpp:(.text+0xaa): r'ef'erence ind'efinie vers << _pthread_mutex_unlock >> /cygdrive/d/Softs/boost_msw/lib/libboost_regex.a(static_mutex.o):static_mutex.cpp:(.text+0xda): r'ef'erence ind'efinie vers << _pthread_mutex_unlock >> /cygdrive/d/Softs/boost_msw/lib/libboost_regex.a(static_mutex.o):static_mutex.cpp:(.text+0x10a): r'ef'erence ind'efinie vers << _pthread_mutex_unlock >> This does not happen when I link a program that uses only filesystem with the filesystem library. Also when I use boost libraries built for cygwin environnement (configure;make install), I have no problem linking with regex. I have tried with threading=multi but obtained the same results. Maybe I should build the no-cygwin libraries totally outside cygwin, i.e. with a standalone compiler? Any tricks? Regards F. Bron 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.

frederic.bron@alcan.com wrote:
I am using boost 1.34.0 I have built the boost libraries from cygwin but for no-cygwin environment (pure win32, independant from cygwin): - I have built bjam with: ./build.bat gcc-nocygwin - I have used bjam like this: path/to/bjam link=static threading=single runtime-link=shared --toolset=gcc-nocygwin --prefix="D:\Softs\boost_msw" --layout=system release install - I then use g++ with -mno-cygwin flag to compile and link
Here is the trouble I get when I link a program that uses regex with the regex library: /cygdrive/d/Softs/boost_msw/lib/libboost_regex.a(static_mutex.o):static_mutex.cpp:(.text+0x1a): r'ef'erence ind'efinie vers << _pthread_mutex_lock >> /cygdrive/d/Softs/boost_msw/lib/libboost_regex.a(static_mutex.o):static_mutex.cpp:(.text+0x54):
I have tried with threading=multi but obtained the same results. Maybe I should build the no-cygwin libraries totally outside cygwin, i.e. with a standalone compiler? Any tricks?
threading=multi is the default, and the cause of the error messages: the regex lib is expecting a pthread lib. Try threading=single, or else build with regular Mingw which I know does work :-) Looks like a configuration issue: we should be using Win32 threads when building with Cygwin and -mno-cygwin. I'll look into that when I get a chance. John.

As you may have seen in later post, I have found a solution: I run configure and then add <cflags>-mno-cygwin in user-config.jam before running bjam. I do not use anymore Windows bjam but cygwin bjam.
Thanks,
F. Bron
___________________________________
Frédéric Bron (frederic.bron@alcan.com)
Unité ALT, Alcan CRV, BP 27, 38341 Voreppe
téléphone : +33 4 76 57 81 72
télécopie : +33 4 76 57 80 99
"John Maddock"
I am using boost 1.34.0 I have built the boost libraries from cygwin but for no-cygwin environment (pure win32, independant from cygwin): - I have built bjam with: ./build.bat gcc-nocygwin - I have used bjam like this: path/to/bjam link=static threading=single runtime-link=shared --toolset=gcc-nocygwin --prefix="D:\Softs\boost_msw" --layout=system release install - I then use g++ with -mno-cygwin flag to compile and link
Here is the trouble I get when I link a program that uses regex with the regex library: /cygdrive/d/Softs/boost_msw/lib/libboost_regex.a(static_mutex.o):static_mutex.cpp:(.text+0x1a): r'ef'erence ind'efinie vers << _pthread_mutex_lock >> /cygdrive/d/Softs/boost_msw/lib/libboost_regex.a(static_mutex.o):static_mutex.cpp:(.text+0x54):
I have tried with threading=multi but obtained the same results. Maybe I should build the no-cygwin libraries totally outside cygwin, i.e. with a standalone compiler? Any tricks?
threading=multi is the default, and the cause of the error messages: the regex lib is expecting a pthread lib. Try threading=single, or else build with regular Mingw which I know does work :-) Looks like a configuration issue: we should be using Win32 threads when building with Cygwin and -mno-cygwin. I'll look into that when I get a chance. John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users 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.
participants (2)
-
frederic.bron@alcan.com
-
John Maddock