View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009865CMakeModulespublic2009-11-09 03:162016-06-10 14:31
ReporterIan Cullinan 
Assigned ToPhilip Lowman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0009865: FindBoost finds libboost_whatever.lib instead of boost_whatever.dll on MinGW
DescriptionDue to `SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")` in Windows-gcc.cmake, FindBoost will pick up the libboost_whatever.lib files instead of boost_whatever.dll, even though I haven't set Boost_USE_STATIC_LIBS. This causes a whole bunch of "undefined reference to `__imp____ZN5boost6..." errors from the linker.
TagsNo tags attached.
Attached Files? file icon FindBoost.cmake [^] (54,757 bytes) 2010-09-11 00:24
txt file icon CMakeLists.txt [^] (736 bytes) 2010-09-19 22:49 [Show Content]
? file icon FindBoost.cmake.2 [^] (52,627 bytes) 2010-09-19 22:50
? file icon foo.cc [^] (241 bytes) 2010-09-19 22:50
txt file icon dir_date_time_works.txt [^] (1,358 bytes) 2010-09-20 23:53 [Show Content]
txt file icon dir_date_time_doesntwork.txt [^] (2,185 bytes) 2010-09-20 23:53 [Show Content]

 Relationships

  Notes
(0022190)
Philip Lowman (developer)
2010-09-11 00:24

I don't understand. I thought that you always link against .dll.a (shared) and .a (static) files with MinGW?

Could you please try the latest FindBoost (attached), enable Boost_DEBUG before your first configure and then post the output here if you're still having problems with it?
(0022200)
Ian Cullinan (reporter)
2010-09-12 22:29

>I don't understand. I thought that you always link against .dll.a (shared) and .a (static) files with MinGW?

That's not exactly right, and is more convention that anything else. A .dll.a file is a MinGW "static import library" for the associated DLL - the equivalent of Visual Studio's .lib static import libraries for linking to DLLs, except that MinGW doesn't actually need a static import library to link to a DLL - it will happily link directly to a .dll file just like you link directly to a .so file on UNIX. The situation is further confused by the fact that static libraries for Visual Studio are usually .lib files, and MinGW static libraries might be .a files (as on UNIX) or .lib files (since we're on Windows).

Building Boost with MinGW and bjam as per the documentation produces a lib folder with DLLs (boost_filesystem-mgw44-1_40.dll), static import libraries for those DLLs (boost_filesystem-mgw44-1_40.lib / boost_filesystem-mgw44.lib) and static libraries (libboost_filesystem-mgw44-1_40.lib etc). The Boost library naming conventions are described here: http://www.boost.org/doc/libs/1_40_0/more/getting_started/windows.html#library-naming [^]


With the following 3-line CMakeLists.txt:

PROJECT(test)
SET(Boost_DEBUG TRUE)
FIND_PACKAGE( Boost 1.34.1 COMPONENTS filesystem )

and Boost 1.40 installed in C:\Boost, I get the following output from CMake (using the "MinGW Makefiles" generator with the CMake 2.8.2 GUI):


The C compiler identification is GNU
The CXX compiler identification is GNU
Check for working C compiler: C:/Workshop/MinGW/bin/gcc.exe
Check for working C compiler: C:/Workshop/MinGW/bin/gcc.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Workshop/MinGW/bin/g++.exe
Check for working CXX compiler: C:/Workshop/MinGW/bin/g++.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:373 ] Boost not in cache
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:376 ] _boost_TEST_VERSIONS = 1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:378 ] Boost_USE_MULTITHREADED = TRUE
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:380 ] Boost_USE_STATIC_LIBS =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:439 ] Declared as CMake or Environmental Variables:
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:441 ] BOOST_ROOT =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:443 ] BOOST_INCLUDEDIR =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:445 ] BOOST_LIBRARYDIR =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:447 ] _boost_TEST_VERSIONS = 1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:496 ] Include debugging info:
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:498 ] _boost_INCLUDE_SEARCH_DIRS = C:/boost/include;C:/boost;C:\Program Files/boost/include;C:\Program Files/boost;/sw/local/include
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:500 ] _boost_PATH_SUFFIXES = boost-1_41_0;boost_1_41_0;boost-1_41;boost_1_41;boost-1_40_0;boost_1_40_0;boost-1_40;boost_1_40;boost-1_39_0;boost_1_39_0;boost-1_39;boost_1_39;boost-1_38_0;boost_1_38_0;boost-1_38;boost_1_38;boost-1_37_0;boost_1_37_0;boost-1_37;boost_1_37;boost-1_36_1;boost_1_36_1;boost-1_36_0;boost_1_36_0;boost-1_36;boost_1_36;boost-1_35_1;boost_1_35_1;boost-1_35_0;boost_1_35_0;boost-1_35;boost_1_35;boost-1_34_1;boost_1_34_1;boost-1_34;boost_1_34
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:524 ] location of version.hpp: C:/Boost/include/boost-1_40/boost/version.hpp
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:543 ] version.hpp reveals boost 1.40.0
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:634 ] guessed _boost_COMPILER = -mgw44
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:644 ] _boost_MULTITHREADED = -mt
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:661 ] _boost_STATIC_TAG =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:663 ] _boost_ABI_TAG = d
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:696 ] _boost_LIBRARIES_SEARCH_DIRS = C:/Boost/include/boost-1_40/lib;C:/Boost/include/boost-1_40/../lib;C:/boost/lib;C:/boost;C:\Program Files/boost/boost_1_40_0/lib;C:\Program Files/boost/boost_1_40/lib;C:\Program Files/boost/lib;C:\Program Files/boost;/sw/local/lib
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:830 ] Boost_FOUND = TRUE
Boost version: 1.40.0
Found the following Boost libraries:
  filesystem


and these cache entries:


Boost_FILESYSTEM_LIBRARY:FILEPATH=C:/Boost/lib/libboost_filesystem-mgw44-mt-1_40.lib
Boost_FILESYSTEM_LIBRARY_DEBUG:FILEPATH=C:/Boost/lib/libboost_filesystem-mgw44-mt-d-1_40.lib
Boost_FILESYSTEM_LIBRARY_RELEASE:FILEPATH=C:/Boost/lib/libboost_filesystem-mgw44-mt-1_40.lib
Boost_INCLUDE_DIR:PATH=C:/Boost/include/boost-1_40
Boost_LIBRARY_DIRS:FILEPATH=C:/Boost/lib
(0022205)
Philip Lowman (developer)
2010-09-12 22:51

I understand what you mean now. Did you test with the updated version I attached by any chance?

If you didn't could you please download it, copy it to the same folder as your 3 line CMakeLists.txt, add following line above find_package() and delete cache/reconfigure?
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})

I don't have a bjam built with MinGW handy and since I did make quite a number of changes I would like to see if the bug isn't resolved (or mitigated) by one of them before I investigate further.
(0022206)
Ian Cullinan (reporter)
2010-09-12 23:20

Whoops, I downloaded it but forgot to drop it in the right folder. Now the output is:

[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:449 ] Boost not in cache
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:452 ] _boost_TEST_VERSIONS = 1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:454 ] Boost_USE_MULTITHREADED = TRUE
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:456 ] Boost_USE_STATIC_LIBS =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:458 ] Boost_USE_STATIC_RUNTIME =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:460 ] Boost_ADDITIONAL_VERSIONS =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:462 ] Boost_NO_SYSTEM_PATHS =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:528 ] Declared as CMake or Environmental Variables:
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:530 ] BOOST_ROOT =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:532 ] BOOST_INCLUDEDIR =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:534 ] BOOST_LIBRARYDIR =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:536 ] _boost_TEST_VERSIONS = 1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:587 ] Include debugging info:
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:589 ] _boost_INCLUDE_SEARCH_DIRS = C:/boost/include;C:/boost;C:\Program Files/boost/include;C:\Program Files/boost;/sw/local/include
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:591 ] _boost_PATH_SUFFIXES = boost-1_44_0;boost_1_44_0;boost-1_44;boost_1_44;boost-1_43_0;boost_1_43_0;boost-1_43;boost_1_43;boost-1_42_0;boost_1_42_0;boost-1_42;boost_1_42;boost-1_41_0;boost_1_41_0;boost-1_41;boost_1_41;boost-1_40_0;boost_1_40_0;boost-1_40;boost_1_40;boost-1_39_0;boost_1_39_0;boost-1_39;boost_1_39;boost-1_38_0;boost_1_38_0;boost-1_38;boost_1_38;boost-1_37_0;boost_1_37_0;boost-1_37;boost_1_37;boost-1_36_1;boost_1_36_1;boost-1_36_0;boost_1_36_0;boost-1_36;boost_1_36;boost-1_35_1;boost_1_35_1;boost-1_35_0;boost_1_35_0;boost-1_35;boost_1_35;boost-1_34_1;boost_1_34_1;boost-1_34;boost_1_34
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:616 ] location of version.hpp: C:/Boost/include/boost-1_40/boost/version.hpp
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:635 ] version.hpp reveals boost 1.40.0
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:726 ] guessed _boost_COMPILER = -mgw44
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:736 ] _boost_MULTITHREADED = -mt
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:779 ] _boost_RELEASE_ABI_TAG = -
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:781 ] _boost_DEBUG_ABI_TAG = -d
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEARCH_DIRS =
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:909 ] Searching for FILESYSTEM_LIBRARY_RELEASE: boost_filesystem-mgw44-mt-1_40;boost_filesystem-mgw44-mt;boost_filesystem-mt-1_40;boost_filesystem-mt;boost_filesystem
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:939 ] Searching for FILESYSTEM_LIBRARY_DEBUG: boost_filesystem-mgw44-mt-d-1_40;boost_filesystem-mgw44-mt-d;boost_filesystem-mt-d-1_40;boost_filesystem-mt;boost_filesystem
[ C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1077 ] Boost_FOUND = TRUE
Boost version: 1.40.0
Found the following Boost libraries:
  filesystem


and it still finds the static libraries.
(0022267)
Philip Lowman (developer)
2010-09-19 22:49

Ok, so here is my configuration.
1. Boost 1.44 extracted in C:\boost\boost_1_44_0
2. Ran bootstrap.bat & built boost with .\bjam --build-type=complete -j8
3. The attached file (FindBoost.cmake.2 renamed)

Using CMake 2.8.2 and the attached CMakeLists.txt, I find the following libraries (including the shared DLL libraries).

As you can see below, it's finding the DLL files just fine for me. So there must be something different about your Boost library directory from mine?

Boost_USE_MULTITHREADED ON
Boost_USE_STATIC_RUNTIME OFF
Boost_USE_STATIC_LIBS ON
C:/boost/boost_1_44_0/stage/lib/libboost_date_time-mgw34-mt-1_44.a
Boost_USE_STATIC_LIBS OFF
C:/boost/boost_1_44_0/stage/lib/libboost_date_time-mgw34-mt-1_44.dll

Boost_USE_MULTITHREADED OFF
Boost_USE_STATIC_RUNTIME OFF
Boost_USE_STATIC_LIBS ON
C:/boost/boost_1_44_0/stage/lib/libboost_date_time-mgw34-1_44.a
Boost_USE_STATIC_LIBS OFF
C:/boost/boost_1_44_0/stage/lib/libboost_date_time-mgw34-1_44.dll

Boost_USE_MULTITHREADED ON
Boost_USE_STATIC_RUNTIME ON
Boost_USE_STATIC_LIBS ON
C:/boost/boost_1_44_0/stage/lib/libboost_date_time-mgw34-mt-s-1_44.a

Boost_USE_MULTITHREADED OFF
Boost_USE_STATIC_RUNTIME ON
Boost_USE_STATIC_LIBS ON
C:/boost/boost_1_44_0/stage/lib/libboost_date_time-mgw34-s-1_44.a



 Directory of C:\boost\boost_1_44_0\stage\lib\*date_time*
09/18/2010 04:55 PM 96,796 libboost_date_time-mgw34-1_44.a
09/18/2010 05:02 PM 573,999 libboost_date_time-mgw34-1_44.dll
09/18/2010 05:02 PM 140,074 libboost_date_time-mgw34-1_44.dll.a
09/18/2010 04:54 PM 1,926,446 libboost_date_time-mgw34-d-1_44.a
09/18/2010 05:02 PM 2,113,672 libboost_date_time-mgw34-d-1_44.dll
09/18/2010 05:02 PM 275,110 libboost_date_time-mgw34-d-1_44.dll.a
09/18/2010 04:51 PM 96,796 libboost_date_time-mgw34-mt-1_44.a
09/18/2010 05:00 PM 574,547 libboost_date_time-mgw34-mt-1_44.dll
09/18/2010 05:00 PM 141,078 libboost_date_time-mgw34-mt-1_44.dll.a
09/18/2010 04:51 PM 1,926,446 libboost_date_time-mgw34-mt-d-1_44.a
09/18/2010 05:00 PM 2,114,732 libboost_date_time-mgw34-mt-d-1_44.dll
09/18/2010 05:00 PM 276,428 libboost_date_time-mgw34-mt-d-1_44.dll.a
09/18/2010 04:56 PM 96,796 libboost_date_time-mgw34-mt-s-1_44.a
09/18/2010 04:55 PM 1,926,446 libboost_date_time-mgw34-mt-sd-1_44.a
09/18/2010 04:58 PM 96,796 libboost_date_time-mgw34-s-1_44.a
09/18/2010 04:57 PM 1,926,446 libboost_date_time-mgw34-sd-1_44.a
              16 File(s) 14,302,608 bytes
               0 Dir(s) 450,425,147,392 bytes free
(0022268)
Philip Lowman (developer)
2010-09-19 22:52

and here is my Boost_DEBUG output for multithreaded, shared library

[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:463 ] Boost not in cache
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:466 ] _boost_TEST_VERSIONS = 1.44;1.44.0;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:468 ] Boost_USE_MULTITHREADED = ON
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:470 ] Boost_USE_STATIC_LIBS = OFF
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:472 ] Boost_USE_STATIC_RUNTIME = OFF
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:474 ] Boost_ADDITIONAL_VERSIONS = 1.44;1.44.0
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:476 ] Boost_NO_SYSTEM_PATHS =
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:542 ] Declared as CMake or Environmental Variables:
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:544 ] BOOST_ROOT =
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:546 ] BOOST_INCLUDEDIR =
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:548 ] BOOST_LIBRARYDIR =
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:550 ] _boost_TEST_VERSIONS = 1.44;1.44.0;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:604 ] Include debugging info:
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:606 ] _boost_INCLUDE_SEARCH_DIRS = C:/boost/include;C:/boost;C:\Program Files (x86)/boost/include;C:\Program Files (x86)/boost;/sw/local/include
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:608 ] _boost_PATH_SUFFIXES = boost-1_44;boost_1_44;boost-1_44_0;boost_1_44_0;boost-1_44_0;boost_1_44_0;boost-1_44;boost_1_44;boost-1_43_0;boost_1_43_0;boost-1_43;boost_1_43;boost-1_42_0;boost_1_42_0;boost-1_42;boost_1_42;boost-1_41_0;boost_1_41_0;boost-1_41;boost_1_41;boost-1_40_0;boost_1_40_0;boost-1_40;boost_1_40;boost-1_39_0;boost_1_39_0;boost-1_39;boost_1_39;boost-1_38_0;boost_1_38_0;boost-1_38;boost_1_38;boost-1_37_0;boost_1_37_0;boost-1_37;boost_1_37;boost-1_36_1;boost_1_36_1;boost-1_36_0;boost_1_36_0;boost-1_36;boost_1_36;boost-1_35_1;boost_1_35_1;boost-1_35_0;boost_1_35_0;boost-1_35;boost_1_35;boost-1_34_1;boost_1_34_1;boost-1_34_0;boost_1_34_0;boost-1_34;boost_1_34;boost-1_33_1;boost_1_33_1;boost-1_33_0;boost_1_33_0;boost-1_33;boost_1_33
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:633 ] location of version.hpp: C:/boost/boost_1_44_0/boost/version.hpp
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:652 ] version.hpp reveals boost 1.44.0
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:743 ] guessed _boost_COMPILER = -mgw34
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:753 ] _boost_MULTITHREADED = -mt
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:796 ] _boost_RELEASE_ABI_TAG = -
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:798 ] _boost_DEBUG_ABI_TAG = -d
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:837 ] _boost_LIBRARY_SEARCH_DIRS = /lib;/stage/lib;C:/boost/boost_1_44_0/lib;C:/boost/boost_1_44_0/../lib;C:/boost/boost_1_44_0/stage/lib;C:/boost/lib;C:/boost;C:\Program Files (x86)/boost/boost_1_44_0/lib;C:\Program Files (x86)/boost/boost_1_44/lib;C:\Program Files (x86)/boost/lib;C:\Program Files (x86)/boost;/sw/local/lib
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:908 ] Searching for DATE_TIME_LIBRARY_RELEASE: boost_date_time-mgw34-mt-1_44;boost_date_time-mgw34-mt;boost_date_time-mt-1_44;boost_date_time-mt;boost_date_time
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:939 ] Searching for DATE_TIME_LIBRARY_DEBUG: boost_date_time-mgw34-mt-d-1_44;boost_date_time-mgw34-mt-d;boost_date_time-mt-d-1_44;boost_date_time-mt;boost_date_time
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:908 ] Searching for SYSTEM_LIBRARY_RELEASE: boost_system-mgw34-mt-1_44;boost_system-mgw34-mt;boost_system-mt-1_44;boost_system-mt;boost_system
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:939 ] Searching for SYSTEM_LIBRARY_DEBUG: boost_system-mgw34-mt-d-1_44;boost_system-mgw34-mt-d;boost_system-mt-d-1_44;boost_system-mt;boost_system
[ C:/Users/Philip/src/cmaketests/boost/FindBoost.cmake:1049 ] Boost_FOUND = TRUE
Boost version: 1.44.0
Found the following Boost libraries:
  date_time
  system
system = C:/boost/boost_1_44_0/stage/lib/libboost_system-mgw34-mt-1_44.dll
date_time = C:/boost/boost_1_44_0/stage/lib/libboost_date_time-mgw34-mt-1_44.dll
Configuring done
(0022269)
Ian Cullinan (reporter)
2010-09-19 23:35

Just tested on another machine, which does work. As far as I can tell, the difference is that on the machines that do work (including yours), the DLLs (and static import libraries) do have the "lib" prefix, contrary to the Boost library naming conventions ( http://www.boost.org/doc/libs/1_44_0/more/getting_started/windows.html#library-naming [^] ). I don't know if there were some funny flags to bjam that produced this difference, or if this is a bug/regression since Boost 1.40 (the machine which isn't working has 1.40, the one that is working has 1.43).

In any case

IF (WIN32)
    SET(CMAKE_FIND_LIBRARY_PREFIXES "" "lib")
ENDIF (WIN32)

in my CMakeLists.txt serves as a workaround, and doesn't seem to break anything.
(0022274)
Philip Lowman (developer)
2010-09-20 08:36

Could you do a "dir *date_time*" in the directory with your boost libs and attach the output? Are you building Boost yourself? Using bjam or CMake?
(0022287)
Ian Cullinan (reporter)
2010-09-20 23:55

No worries, see 'dir_date_time_works.txt' and 'dir_date_time_doesntwork.txt'.

As far as I can remember, I built Boost myself, with bjam as per the docs.
(0041612)
Kitware Robot (administrator)
2016-06-10 14:27

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2009-11-09 03:16 Ian Cullinan New Issue
2010-09-10 23:52 Philip Lowman Status new => assigned
2010-09-10 23:52 Philip Lowman Assigned To => Philip Lowman
2010-09-11 00:24 Philip Lowman File Added: FindBoost.cmake
2010-09-11 00:24 Philip Lowman Note Added: 0022190
2010-09-12 22:29 Ian Cullinan Note Added: 0022200
2010-09-12 22:51 Philip Lowman Note Added: 0022205
2010-09-12 23:20 Ian Cullinan Note Added: 0022206
2010-09-19 22:49 Philip Lowman Note Added: 0022267
2010-09-19 22:49 Philip Lowman File Added: CMakeLists.txt
2010-09-19 22:50 Philip Lowman File Added: FindBoost.cmake.2
2010-09-19 22:50 Philip Lowman File Added: foo.cc
2010-09-19 22:52 Philip Lowman Note Added: 0022268
2010-09-19 23:35 Ian Cullinan Note Added: 0022269
2010-09-20 08:36 Philip Lowman Note Added: 0022274
2010-09-20 23:53 Ian Cullinan File Added: dir_date_time_works.txt
2010-09-20 23:53 Ian Cullinan File Added: dir_date_time_doesntwork.txt
2010-09-20 23:55 Ian Cullinan Note Added: 0022287
2016-06-10 14:27 Kitware Robot Note Added: 0041612
2016-06-10 14:27 Kitware Robot Status assigned => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team