Hello Michael,
Thx for your answer.
The problem seems to be that the choices which boost gives you are a
bit unclear, compared to the explanation in the documentation.
You need to install the multithread static libs, sais the doc.
In boost you got eight options: the one which make cmake work correctly
is "multithread debug", that way you have libs which filename start with
libboost*.lib. The "multithread static (debug)" nor "multithread dll
(debug)" are doing a good job...
So, an easy solution is indeed: install all possible lib files in the
lib directory and cmake will select the correct one for you.
Thanks again!
Werner
On Wed, 28 Mar 2012 08:05:54 -0700, Michael P. Gerlek wrote:
I've not built in a while, but you might try the following steps:
1- download and unpack boost, from the boost website
2- download *all* the VS10 binaries from http://boost.teeks99.com;
move them from the lib32 dir they come in to the <boost>/lib
3- run my mpg-config.bat script, after changing any paths as needed
-mpg
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Werner
Goeman
Sent: Wednesday, March 28, 2012 4:50 AM
To: [email protected]
Subject: [Liblas-devel] VS2010 LNK2005 error between msvcprtd.lib
and libboost
Setup: VS2010 – Cmake 2.8.7 – libLAS1.7.0
This is about a LNK2005 error between msvcprtd.lib and
libboost_program_options-vc100-mt-sgd-1_47.lib
I follow the documentation as close as possible. I didn’t add
optional
libraries, only boost was installed (succesfully). CMake runs good,
I
think, but selects the static lib which are mutlithread NOT debug
mode.
I fixed this by manually changing the libs in CMake GUI. The
solution
for VS was then created.
When I try to build in VS2010, I get the same type of error all
over:
File msvcprtd.lib(MSVCP100D.dll):
error LNK2005: "public: struct std::_Iterator_base12 * * __thiscall
std::_Container_base12::_Getpfirst(void)const "
(?_Getpfirst@_Container_base12@std@@QBEPAPAU_Iterator_base12@2@XZ)
already defined in
libboost_program_options-vc100-mt-sgd-1_47.lib(parsers.obj)
C:\Dev\libLAS\libLAS-1.7.0\src\msvcprtd.lib(MSVCP100D.dll)
It looks to me that I need to link against the dynamic libraries of
boost, but when I try that, VS always tries to find the wrong libs
even
after I manually changed the filenames to link against in CMake
and/or
the project settings itself in VS. The thing there is that the cmake
construct expects the library names to begin with “libboost” which
is
the case for static libs, but for dynamic ones it is just “boost”.
When
trying to build, it seems that the libboost files are still linked
against even if they are NOT mentioned in the project settings. But
in
the end, I don’t know if that willl solve my LNK2005 problem above…
Can someone give a clue what is happening here?
Thank you!
Werner
_______________________________________________
Liblas-devel mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/liblas-devel
_______________________________________________
Liblas-devel mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/liblas-devel