Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 519475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:02:42+00:00 2026-05-13T08:02:42+00:00

I am having a issue where nmake is not linking the boost library cmake

  • 0

I am having a issue where nmake is not linking the boost library cmake is providing. I am not exactly sure why it is doing this.


cmake_minimum_required(VERSION 2.8)
project(BoostLibTest)
set(Boost_USE_STATIC_LIBS TRUE)
set(Boost_MULTITHREADED TRUE)
set(Boost_DEBUG TRUE)
find_package(Boost COMPONENTS regex)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
add_executable(Example example.cpp)
target_link_libraries(Example ${Boost_LIBRARIES})

CMake output:


-- Building for: NMake Makefiles
-- The C compiler identification is MSVC
-- The CXX compiler identification is MSVC
-- Check for CL compiler version
-- Check for CL compiler version - 1500
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check CL platform
-- Check CL platform - 64 bit
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:362 ] Boost not in cache
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:365 ] _boost_TEST_VERSIONS = 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:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:367 ] Boost_USE_MULTITHREADED = TRUE
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:369 ] Boost_USE_STATIC_LIBS = TRUE
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:428 ] Declared as CMake or Environmental Variables:
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:430 ]   BOOST_ROOT = 
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:432 ]   BOOST_INCLUDEDIR = 
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:434 ]   BOOST_LIBRARYDIR = 
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:436 ] _boost_TEST_VERSIONS = 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:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:485 ] Include debugging info:
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:487 ]   _boost_INCLUDE_SEARCH_DIRS = C:/boost/include;C:/boost;C:\Program Files (x86)/boost/include;C:\Program Files (x86)/boost;/sw/local/include
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:489 ]   _boost_PATH_SUFFIXES = 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:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:513 ] location of version.hpp: C:/Program Files (x86)/boost/boost_1_40/boost/version.hpp
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:532 ] version.hpp reveals boost 1.40.0
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:623 ] guessed _boost_COMPILER = -vc90
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:633 ] _boost_MULTITHREADED = -mt
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:650 ] _boost_STATIC_TAG = -s
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:652 ] _boost_ABI_TAG = gd
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:685 ] _boost_LIBRARIES_SEARCH_DIRS = C:/Program Files (x86)/boost/boost_1_40/lib;C:/Program Files (x86)/boost/boost_1_40/../lib;C:/boost/lib;C:/boost;C:\Program Files (x86)/boost/boost_1_40_0/lib;C:\Program Files (x86)/boost/boost_1_40/lib;C:\Program Files (x86)/boost/lib;C:\Program Files (x86)/boost;/sw/local/lib
-- [ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:814 ] Boost_FOUND = TRUE
-- Boost version: 1.40.0
-- Found the following Boost libraries:
--   regex
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/blewisjr/Documents/BoostLibTest/bin

NMake output:


Scanning dependencies of target Example
[100%] Building CXX object CMakeFiles/Example.dir/example.cpp.obj
example.cpp
Linking CXX executable Example.exe
example.cpp.obj : error LNK2019: unresolved external symbol "private: class boost::basic_regex > > & __cdecl boost::basic_regex > >::do_assign(char const *,char const *,unsigned int)" (?do_assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@AEAAAEAV12@PEBD0I@Z) referenced in function "public: class boost::basic_regex > > & __cdecl boost::basic_regex > >::assign(char const *,char const *,unsigned int)" (?assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@QEAAAEAV12@PEBD0I@Z)

example.cpp.obj : error LNK2019: unresolved external symbol "public: bool __cdecl boost::re_detail::perl_matcher,class std::allocator >,class std::allocator,class std::allocator > > >,struct boost::regex_traits > >::match(void)" (?match@?$perl_matcher@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@boost@@@2@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@QEAA_NXZ) referenced in function "bool __cdecl boost::regex_match,class std::allocator >,class std::allocator,class std::allocator > > >,char,struct boost::regex_traits > >(class std::_String_const_iterator,class std::allocator >,class std::_String_const_iterator,class std::allocator >,class boost::match_results,class std::allocator >,class std::allocator,class std::allocator > > > > &,class boost::basic_regex > > const &,enum boost::regex_constants::_match_flags)" (??$regex_match@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@boost@@@2@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@YA_NV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0AEAV?$match_results@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@boost@@@2@@0@AEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@0@W4_match_flags@regex_constants@0@@Z)

example.cpp.obj : error LNK2019: unresolved external symbol "private: void __cdecl boost::re_detail::perl_matcher,class std::allocator >,class std::allocator,class std::allocator > > >,struct boost::regex_traits > >::construct_init(class boost::basic_regex > > const &,enum boost::regex_constants::_match_flags)" (?construct_init@?$perl_matcher@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@boost@@@2@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@AEAAXAEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@3@W4_match_flags@regex_constants@3@@Z) referenced in function "public: __cdecl boost::re_detail::perl_matcher,class std::allocator >,class std::allocator,class std::allocator > > >,struct boost::regex_traits > >::perl_matcher,class std::allocator >,class std::allocator,class std::allocator > > >,struct boost::regex_traits > >(class std::_String_const_iterator,class std::allocator >,class std::_String_const_iterator,class std::allocator >,class boost::match_results,class std::allocator >,class std::allocator,class std::allocator > > > > &,class boost::basic_regex > > const &,enum boost::regex_constants::_match_flags,class std::_String_const_iterator,class std::allocator >)" (??0?$perl_matcher@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@boost@@@2@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@QEAA@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0AEAV?$match_results@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@U?$sub_match@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@boost@@@2@@2@AEBV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@2@W4_match_flags@regex_constants@2@0@Z)

Example.exe : fatal error LNK1120: 3 unresolved externals

LINK Pass 1 failed. with 2

After the failed link NMake is throwing fatal error U1077

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:02:42+00:00Added an answer on May 13, 2026 at 8:02 am

    Turns out I was targeting x64 with boost libs only built for x86 issues solved by switching compiler to x86

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having issue when sending data from Service to Activity through Notification ,
I am having issue with memory after running many times my app. java.lang.OutOfMemoryError: bitmap
I am having issue with git pull.I have commited my changes in local repo.
I am having issue while showing a WebView in an activity in the middle
Experts, I'm having issue when sending emails out. Currently, I have a feedback form
I am trying to implement BST algorithm using Cormen's pseudo code yet having issue.
We are using MSDTC for SQL transactions. I am having issue with setting up
Iam work on full text search build out. Im having issue on how to
I'm currently rewriting a PHP Extension that was originally written for PHP 4.2.2. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.