By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,148 Members | 1,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,148 IT Pros & Developers. It's quick & easy.

boost regex library problem with release build

P: n/a
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

Sep 29 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
ma***********@gmail.com wrote:
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".
This is probably a problem with your environment configuration, so
follow-ups will need to go to a Microsoft-specific forum (cf.
http://www.parashift.com/c++-faq-lit....html#faq-5.9).
<OT>I'm not intimate with VC++8, but I'd guess that your release and
debug builds have a different project settings. In particular, you're
linker directory settings are likely different between the two.</OT>

Cheers! --M

Sep 29 '06 #2

P: n/a
I have checked the project setting for debug and release, they have the
same directory path to the boost lib directory.

My project configurationt type is "Dynamic Library (.dll)".

I wonder why boost lib points to the lib file with -s instead the one
with only -mt

"libboost_regex-vc80-mt-1_33_1.lib" ------for release ???
"libboost_regex-vc80-mt-s-1_33_1.lib" ------statically link
"libboost_regex-vc80-mt-gd-1_33_1.lib" -----debug

- Maggie

Sep 29 '06 #3

P: n/a

ma***********@gmail.com wrote:
I have checked the project setting for debug and release, they have the
same directory path to the boost lib directory.

My project configurationt type is "Dynamic Library (.dll)".

I wonder why boost lib points to the lib file with -s instead the one
with only -mt

"libboost_regex-vc80-mt-1_33_1.lib" ------for release ???
"libboost_regex-vc80-mt-s-1_33_1.lib" ------statically link
"libboost_regex-vc80-mt-gd-1_33_1.lib" -----debug

- Maggie
Try the boost users list:

You will need to subscribe as detailed here:

http://lists.boost.org/mailman/listinfo.cgi/boost-users

regards
Andy Little

Sep 29 '06 #4

P: n/a
Yes, I have... still waiting for pending approval. Appparently, it's a
moderated list. I can't post it right away.

I try with this flag: BOOST_REGEX_DYN_LINK
on: http://www.boost.org/libs/regex/doc/configuration.html

but it gives me this error:
Error 1 fatal error C1189: #error : "Mixing a dll boost library with a
static runtime is a really bad
idea..." c:\workspace\tools\project_test\main\boost\boost\c onfig\auto_link.hpp 281

I also post on a windows microsoft group.

Thanks for your help.
Maggie

Sep 29 '06 #5

P: n/a
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
ma***********@gmail.com wrote:
Yes, I have... still waiting for pending approval. Appparently, it's a
moderated list. I can't post it right away.

I try with this flag: BOOST_REGEX_DYN_LINK
on: http://www.boost.org/libs/regex/doc/configuration.html

but it gives me this error:
Error 1 fatal error C1189: #error : "Mixing a dll boost library with a
static runtime is a really bad
idea..." c:\workspace\tools\project_test\main\boost\boost\c onfig\auto_link.hpp 281

I also post on a windows microsoft group.

Thanks for your help.
Maggie
Sep 29 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.