boost regex library problem with release build - Programmer

This is a discussion on boost regex library problem with release build - Programmer ; Hi, I use Visual Studios 2005. In my project file, I include the library in linker: "Additional Library Directories: ..\..\boost\lib" I have these libs in the boost\lib directory: libboost_date_time-vc80-mt-1_33_1.lib libboost_date_time-vc80-mt-gd-1_33_1.lib libboost_regex-vc80-mt-1_33_1.lib libboost_regex-vc80-mt-gd-1_33_1.lib libboost_thread-vc80-mt-1_33_1.lib libboost_thread-vc80-mt-gd-1_33_1.lib When I build my project as ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: boost regex library problem with release build

  1. boost regex library problem with release build

    Hi,

    I use Visual Studios 2005.

    In my project file, I include the library in linker:
    "Additional Library Directories: ..\..\boost\lib"

    I have these libs in the boost\lib directory:

    libboost_date_time-vc80-mt-1_33_1.lib
    libboost_date_time-vc80-mt-gd-1_33_1.lib
    libboost_regex-vc80-mt-1_33_1.lib
    libboost_regex-vc80-mt-gd-1_33_1.lib
    libboost_thread-vc80-mt-1_33_1.lib
    libboost_thread-vc80-mt-gd-1_33_1.lib

    When I build my project as a debug build. it compiles fine.

    However, if I change to release build, it gives me this error:

    Error 1 fatal error LNK1104: cannot open file
    'libboost_regex-vc80-mt-s-1_33_1.lib'

    Please let me know what I need to do to have it point to
    "libboost_regex-vc80-mt-1_33_1.lib" instead of
    "libboost_regex-vc80-mt-s-1_33_1.lib".

    Thanks very much,
    Maggie


  2. Re: boost regex library problem with release build

    I fixed the problem.

    For debug: my project setting as:
    C/C++ > Code Generation > Runtime LIbrary as "Multi-threaded DLL (/MD)"

    But in my release setting:
    C/C++ > Code Generation > Runtime LIbrary as "Multi-threaded (/MT)"

    When I changed it to "Multi-threaded DLL (/MD)", then it works!

    FYI,
    Maggie


+ Reply to Thread