can't build threads on msvc-7.1

I can't build the thread library. I have no idea why. ( What gregorian date is doing in the thread lib eludes me ) I have changed boost/config/user.hpp to #define BOOST_ALL_DYN_LIN, of course, that shouldn't effect threads.... but whatever.... Anyone got a clue? C:\RTI\devroot\packages-src\boost_1_37_0>cl.exe Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.6030 for 80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved. usage: cl [ option... ] filename... [ /link linkoption... ] C:\RTI\devroot\packages-src\boost_1_37_0>bjam --version Boost.Build V2 (Milestone 12) Boost.Jam 03.1.17 C:\RTI\devroot\packages-src\boost_1_37_0>bjam --with-thread toolset=msvc-7.1 var iant=release link=shared WARNING: No python installation configured and autoconfiguration failed. See http://www.boost.org/libs/python/doc/building.html for configuration instructions or pass --without-python to suppress this message and silently skip all Boost.Python targets ...patience... ...found 716 targets... ...updating 2 targets... msvc.link.dll bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll Creating library bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.lib and object bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.exp thread.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall boost::gregorian::greg_month::greg_month(unsigned short)" (__im p_??0greg_month@gregorian@boost@@QAE@G@Z) referenced in function "public: __thiscall boost::gregorian::date::date(enum boost::date_time::special_values)" (??0da te@gregorian@boost@@QAE@W4special_values@date_time@2@@Z) bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll : fatal error LNK1120: 1 unresolved externals call "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat" >nul link /NOLOGO /INCREMENTAL:NO /DLL /subsystem:console /out:"bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll" /IMPLIB:"bin .v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.lib" @"bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_threa d-vc71-mt-1_37.dll.rsp" if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL% if exist "bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boos t_thread-vc71-mt-1_37.dll.manifest" ( mt -nologo -manifest "bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll.manifest" "-outputresource:bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll;2" ) ...failed msvc.link.dll bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.lib... ...removing bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.lib ...failed updating 2 targets...

There should be no problems. I use the default boost/config/user.hpp,
then I run bjam and then do the following:
Try:
"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
..\bjam --toolset=msvc --build-type=complete stage install > result.txt
You will have to change the first command to reflect your vcvars32.bat path.
I generally use the static builds but I have learned fro experience
that you need both the debug and release builds. Hence the option:
--build-type=complete
Andrew
On Fri, Jan 16, 2009 at 11:01 AM, Larry E. Ramey
I can't build the thread library. I have no idea why. ( What gregorian date is doing in the thread lib eludes me )
I have changed boost/config/user.hpp to #define BOOST_ALL_DYN_LIN, of course, that shouldn't effect threads.... but whatever....
Anyone got a clue?
C:\RTI\devroot\packages-src\boost_1_37_0>cl.exe Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.6030 for 80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
C:\RTI\devroot\packages-src\boost_1_37_0>bjam --version Boost.Build V2 (Milestone 12) Boost.Jam 03.1.17
C:\RTI\devroot\packages-src\boost_1_37_0>bjam --with-thread toolset=msvc-7.1 var iant=release link=shared WARNING: No python installation configured and autoconfiguration failed. See http://www.boost.org/libs/python/doc/building.html for configuration instructions or pass --without-python to suppress this message and silently skip all Boost.Python targets ...patience... ...found 716 targets... ...updating 2 targets... msvc.link.dll bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll Creating library bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.lib and object bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.exp
thread.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall boost::gregorian::greg_month::greg_month(unsigned short)" (__im p_??0greg_month@gregorian@boost@@QAE@G@Z) referenced in function "public: __thiscall boost::gregorian::date::date(enum boost::date_time::special_values)" (??0da te@gregorian@boost@@QAE@W4special_values@date_time@2@@Z) bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll : fatal error LNK1120: 1 unresolved externals
call "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat" >nul link /NOLOGO /INCREMENTAL:NO /DLL /subsystem:console /out:"bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll" /IMPLIB:"bin .v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.lib" @"bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_threa d-vc71-mt-1_37.dll.rsp" if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL% if exist "bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boos t_thread-vc71-mt-1_37.dll.manifest" ( mt -nologo -manifest "bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll.manifest" "-outputresource:bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll;2" )
...failed msvc.link.dll bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.dll bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.lib... ...removing bin.v2\libs\thread\build\msvc-7.1\release\threading-multi\boost_thread-vc71-mt-1_37.lib ...failed updating 2 targets...
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- ___________________________________________ Andrew J. P. Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney 2006 NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: http://www.acfr.usyd.edu.au/ ___________________________________________

AMDG Andrew Maclean wrote:
There should be no problems. I use the default boost/config/user.hpp, then I run bjam and then do the following: Try: "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" ..\bjam --toolset=msvc --build-type=complete stage install > result.txt
You will have to change the first command to reflect your vcvars32.bat path.
You shouldn't need to set the environment. Boost.Build knows how to find msvc. In Christ, Steven Watanabe

AMDG Larry E. Ramey wrote:
I can't build the thread library. I have no idea why. ( What gregorian date is doing in the thread lib eludes me )
I have changed boost/config/user.hpp to #define BOOST_ALL_DYN_LIN, of course, that shouldn't effect threads.... but whatever....
This is the problem. If you don't need other changes to user.hpp, you can suppress it with bjam ... define=BOOST_NO_USER_CONFIG for building the thread library. In Christ, Steven Watanabe

OK..... It seems you are correct. Does it strike anyone else that this is a REALLY REALLY bad design? Boost 1.35 used to make just fine if you changed user.hpp. We use only dlls here. I NEVER want a static lib, since threads shouldn't build static lib, why is this define effecting the thread build? Larry E. Ramey Steven Watanabe wrote:
AMDG
Larry E. Ramey wrote:
I can't build the thread library. I have no idea why. ( What gregorian date is doing in the thread lib eludes me )
I have changed boost/config/user.hpp to #define BOOST_ALL_DYN_LIN, of course, that shouldn't effect threads.... but whatever....
This is the problem. If you don't need other changes to user.hpp, you can suppress it with bjam ... define=BOOST_NO_USER_CONFIG for building the thread library.
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

AMDG Larry E. Ramey wrote:
It seems you are correct. Does it strike anyone else that this is a REALLY REALLY bad design?
Not a bad design--just a bug.
Boost 1.35 used to make just fine if you changed user.hpp. We use only dlls here. I NEVER want a static lib, since threads shouldn't build static lib, why is this define effecting the thread build?
The problem comes from code like this in DateTime: class __declspec(dllimport) C { public: void f() {} }; Calling f may result in a linker error even though it is defined inline. In Christ, Steven Watanabe
participants (3)
-
Andrew Maclean
-
Larry E. Ramey
-
Steven Watanabe