[Scons-users] linking to boost 1.54 w/ windows and visual studio 2013 RC

Philipp Kraus philipp.kraus at tu-clausthal.de
Thu Sep 26 01:32:29 EDT 2013


You're welcome :-)

Phil

Am 25.09.2013 um 16:16 schrieb Jarrett Chisholm <j.chisholm at chisholmsoft.com>:


> Thanks Philipp

>

> Turns out it's definitely a boost issue - I got the latest boost trunk (1.55), compiled it, and am now able to link it properly.

>

> Cheers

>

> Jarrett

>

> On 24/09/13 04:00 PM, Philipp Kraus wrote:

>> see http://www.boost.org/doc/libs/1_54_0/more/getting_started/windows.html#identify-your-toolset

>>

>> "On Windows, append a version number even if you only have one version installed (unless you are using the msvc or gcc toolsets, which have special version detection code) or auto-linking will fail."

>>

>> and

>>

>>

>> see http://www.boost.org/doc/libs/1_54_0/more/getting_started/windows.html#link-your-program-to-a-boost-library

>>

>> "Auto-Linking

>> Most Windows compilers and linkers have so-called “auto-linking support,” which eliminates the second challenge. Special code in Boost header files detects your compiler options and uses that information to encode the name of the correct library into your object files; the linker selects the library with that name from the directories you've told it to search.

>>

>> "

>>

>>

>> You need to check your toolset and the toolset which is used by SCons.

>>

>>

>> Am 24.09.2013 um 21:00 schrieb Jarrett Chisholm <j.chisholm at chisholmsoft.com>:

>>

>>> On 24/09/13 02:35 PM, Philipp Kraus wrote:

>>>> This seems to be not a SCons problem, see http://www.boost.org/doc/libs/1_54_0/more/getting_started/unix-variants.html#library-naming

>>>> It is recommend that all parts are build with equal compilers & linkers.

>>>> The Boost libs are defined by the Boost build configuration and the detection of the depend libraries are stored into the configuration

>>>>

>>>> Phil

>>>>

>>>>

>>>> Am 24.09.2013 um 19:49 schrieb Jarrett Chisholm <j.chisholm at chisholmsoft.com>:

>>>>

>>>>> Hi all

>>>>>

>>>>> I'm trying to compile my project as a shared library using scons. I'm

>>>>> using Windows 7, and the Visual Studio 2013 RC. In the project, I'm

>>>>> using boost.

>>>>>

>>>>> The project compiles fine. However, when it tries to link, I get the

>>>>> following:

>>>>>

>>>>> scons: warning: No version of Visual Studio compiler found - C/C++

>>>>> compilers most likely not set correctly

>>>>>

>>>>> scons: Reading SConscript files ...

>>>>> Compiling Glr

>>>>> scons: Reading SConscript files ...

>>>>> Parsing Shaders into header ShaderData.h

>>>>> Done parsing Shaders into header ShaderData.h

>>>>> scons: done reading SConscript files.

>>>>> scons: Building targets ...

>>>>> Using tempfile c:\users\jarrett\appdata\local\temp\tmpecwym3.lnk for

>>>>> command line:

>>>>> link /nologo /dll /out:build\glr.dll /implib:build\glr.lib

>>>>> /LIBPATH:build /LIBPATH:src

>>>>> /LIBPATH:C:\Users\Jarrett\projects\angelscript-sdk\angelscript\lib

>>>>> /LIBPATH:C:\Users\Jarrett\projects\sqlite3

>>>>> /LIBPATH:C:\Users\Jarrett\projects\berkelium-win32\lib

>>>>> /LIBPATH:C:\Users\Jarrett\projects\SFML\lib "/LIBPATH:C:\Program

>>>>> Files\Assimp\lib\x86" "/LIBPATH:C:\Program Files (x86)\Boost\lib"

>>>>> /LIBPATH:C:\Users\Jarrett\projects\FreeImage\Dist "/LIBPATH:C:\Program

>>>>> Files (x86)\Microsoft Visual Studio 12.0\VC\lib" opengl32.lib glew32.lib

>>>>> berkelium.lib sfml-system.lib sfml-window.lib assimp.lib freeimage.lib

>>>>> libboost_log-vc120-mt-1_54.lib libboost_log_setup-vc120-mt-1_54.lib

>>>>> libboost_date_time-vc120-mt-1_54.lib libboost_thread-vc120-mt-1_54.lib

>>>>> libboost_wave-vc120-mt-1_54.lib libboost_regex-vc120-mt-1_54.lib

>>>>> libboost_filesystem-vc120-mt-1_54.lib libboost_system-vc120-mt-1_54.lib

>>>>> build\BasicSceneManager.obj build\BasicSceneNode.obj build\Camera.obj

>>>>> build\GlrProgram.obj build\GraphicsEngine.obj build\Light.obj

>>>>> build\Window.obj build\common\math\Math.obj build\common\io\File.obj

>>>>> build\BasicSceneManager.obj build\BasicSceneNode.obj build\Camera.obj

>>>>> build\GlrProgram.obj build\GraphicsEngine.obj build\Light.obj

>>>>> build\Window.obj build\exceptions\Exception.obj

>>>>> build\exceptions\FormatException.obj build\exceptions\GlException.obj

>>>>> build\exceptions\IoException.obj build\gui\CallbackParameter.obj

>>>>> build\gui\GUI.obj build\gui\GUIObject.obj build\gui\HtmlGuiComponent.obj

>>>>> build\models\Animation.obj build\models\AssImpLoader.obj

>>>>> build\models\Model.obj build\models\ModelLoader.obj

>>>>> build\models\ModelManager.obj build\glw\Animation.obj

>>>>> build\glw\AnimationManager.obj build\glw\Constants.obj

>>>>> build\glw\Material.obj build\glw\MaterialManager.obj build\glw\Mesh.obj

>>>>> build\glw\MeshManager.obj build\glw\OpenGlDevice.obj

>>>>> build\glw\Texture.obj build\glw\TextureManager.obj

>>>>> build\glw\shaders\CPreProcessor.obj build\glw\shaders\GlrParser.obj

>>>>> build\glw\shaders\GlrPreProcessor.obj build\glw\shaders\GlrShader.obj

>>>>> build\glw\shaders\GlrShaderProgram.obj build\glw\shaders\GlslShader.obj

>>>>> build\glw\shaders\GlslShaderProgram.obj

>>>>> build\glw\shaders\ShaderProgramManager.obj

>>>>> link @c:\users\jarrett\appdata\local\temp\tmpecwym3.lnk

>>>>> Using tempfile c:\users\jarrett\appdata\local\temp\tmpep9gzl.lnk for

>>>>> command line:

>>>>> link /nologo /dll /out:build\glr.dll /implib:build\glr.lib

>>>>> /LIBPATH:build /LIBPATH:src

>>>>> /LIBPATH:C:\Users\Jarrett\projects\angelscript-sdk\angelscript\lib

>>>>> /LIBPATH:C:\Users\Jarrett\projects\sqlite3

>>>>> /LIBPATH:C:\Users\Jarrett\projects\berkelium-win32\lib

>>>>> /LIBPATH:C:\Users\Jarrett\projects\SFML\lib "/LIBPATH:C:\Program

>>>>> Files\Assimp\lib\x86" "/LIBPATH:C:\Program Files (x86)\Boost\lib"

>>>>> /LIBPATH:C:\Users\Jarrett\projects\FreeImage\Dist "/LIBPATH:C:\Program

>>>>> Files (x86)\Microsoft Visual Studio 12.0\VC\lib" opengl32.lib glew32.lib

>>>>> berkelium.lib sfml-system.lib sfml-window.lib assimp.lib freeimage.lib

>>>>> libboost_log-vc120-mt-1_54.lib libboost_log_setup-vc120-mt-1_54.lib

>>>>> libboost_date_time-vc120-mt-1_54.lib libboost_thread-vc120-mt-1_54.lib

>>>>> libboost_wave-vc120-mt-1_54.lib libboost_regex-vc120-mt-1_54.lib

>>>>> libboost_filesystem-vc120-mt-1_54.lib libboost_system-vc120-mt-1_54.lib

>>>>> build\BasicSceneManager.obj build\BasicSceneNode.obj build\Camera.obj

>>>>> build\GlrProgram.obj build\GraphicsEngine.obj build\Light.obj

>>>>> build\Window.obj build\common\math\Math.obj build\common\io\File.obj

>>>>> build\BasicSceneManager.obj build\BasicSceneNode.obj build\Camera.obj

>>>>> build\GlrProgram.obj build\GraphicsEngine.obj build\Light.obj

>>>>> build\Window.obj build\exceptions\Exception.obj

>>>>> build\exceptions\FormatException.obj build\exceptions\GlException.obj

>>>>> build\exceptions\IoException.obj build\gui\CallbackParameter.obj

>>>>> build\gui\GUI.obj build\gui\GUIObject.obj build\gui\HtmlGuiComponent.obj

>>>>> build\models\Animation.obj build\models\AssImpLoader.obj

>>>>> build\models\Model.obj build\models\ModelLoader.obj

>>>>> build\models\ModelManager.obj build\glw\Animation.obj

>>>>> build\glw\AnimationManager.obj build\glw\Constants.obj

>>>>> build\glw\Material.obj build\glw\MaterialManager.obj build\glw\Mesh.obj

>>>>> build\glw\MeshManager.obj build\glw\OpenGlDevice.obj

>>>>> build\glw\Texture.obj build\glw\TextureManager.obj

>>>>> build\glw\shaders\CPreProcessor.obj build\glw\shaders\GlrParser.obj

>>>>> build\glw\shaders\GlrPreProcessor.obj build\glw\shaders\GlrShader.obj

>>>>> build\glw\shaders\GlrShaderProgram.obj build\glw\shaders\GlslShader.obj

>>>>> build\glw\shaders\GlslShaderProgram.obj

>>>>> build\glw\shaders\ShaderProgramManager.obj

>>>>> build\BasicSceneManager.obj : warning LNK4042: object specified more

>>>>> than once; extras ignored

>>>>> build\BasicSceneNode.obj : warning LNK4042: object specified more than

>>>>> once; extras ignored

>>>>> build\Camera.obj : warning LNK4042: object specified more than once;

>>>>> extras ignored

>>>>> build\GlrProgram.obj : warning LNK4042: object specified more than once;

>>>>> extras ignored

>>>>> build\GraphicsEngine.obj : warning LNK4042: object specified more than

>>>>> once; extras ignored

>>>>> build\Light.obj : warning LNK4042: object specified more than once;

>>>>> extras ignored

>>>>> build\Window.obj : warning LNK4042: object specified more than once;

>>>>> extras ignored

>>>>> LINK : fatal error LNK1104: cannot open file

>>>>> 'libboost_log-vc110-mt-1_54.lib'

>>>>> scons: building terminated because of errors.

>>>>> scons: *** [build/glr.dll] Error 1104

>>>>>

>>>>> I'm curious why it's trying to link to `libboost_log-vc110-mt-1_54.lib`

>>>>> instead of `libboost_log-vc120-mt-1_54.lib`, which is what I specified

>>>>> in the link command. Also, as far as I can tell, `vcxxx` is the

>>>>> compiler tag boost uses to tell what version of the compiler built the

>>>>> boost library...so it's almost like `scons` thinks boost was built using

>>>>> Visual Studio 2012, which would be `vc110`...I'm not sure.

>>>>>

>>>>> Any help is appreciated!

>>>>>

>>>>> Cheers

>>>>>

>>>>> Jarrett

>>>>> _______________________________________________

>>>>> Scons-users mailing list

>>>>> Scons-users at scons.org

>>>>> http://four.pairlist.net/mailman/listinfo/scons-users

>>>>

>>>>

>>>>

>>>> _______________________________________________

>>>> Scons-users mailing list

>>>> Scons-users at scons.org

>>>> http://four.pairlist.net/mailman/listinfo/scons-users

>>> Yeah, I built boost with MSVC 2013 as well, and it built libraries with the 'vc120' tag, which is correct. In the above link command, I'm trying to link against these libraries. It seems like something (scons?) is trying to link to the boost log library built with MSVC 2012 (i.e. vc110), even though I don't list any boost library built with the 'vc110' tag in the linker command...

>>>

>>> I posted to the boost list, and they recommended I ask here :S

>>> _______________________________________________

>>> Scons-users mailing list

>>> Scons-users at scons.org

>>> http://four.pairlist.net/mailman/listinfo/scons-users

>>

>>

>>

>>

>> _______________________________________________

>> Scons-users mailing list

>> Scons-users at scons.org

>> http://four.pairlist.net/mailman/listinfo/scons-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130926/ea807cab/attachment.htm


More information about the Scons-users mailing list