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 7851571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:12:56+00:00 2026-06-02T19:12:56+00:00

How to create a simple project that would use compiled for VC staticaly linked

  • 0

How to create a simple project that would use compiled for VC staticaly linked boost (that is somewhhere like C:/boost)? How shall my project file look like?

I tried to add to .pro

INCLUDEPATH += C:/BOOST/include/boost-1_49
DEPENDPATH += C:/BOOST/lib
 LIBS += -LC:/BOOST/lib -llibboost_system-vc100-mt-sgd-1_49 -llibboost_thread-vc100-mt-sgd-1_49

but I get:

msvcprtd.lib(MSVCP100D.dll):-1: ERROR: LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) already defined in libboost_system-vc100-mt-sgd-1_49.lib(error_code.obj)

msvcprtd.lib(MSVCP100D.dll):-1: ERROR: LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QAE@XZ) already defined in libboost_system-vc100-mt-sgd-1_49.lib(error_code.obj)

msvcprtd.lib(MSVCP100D.dll):-1: ERROR: LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QAEXXZ) already defined in libboost_system-vc100-mt-sgd-1_49.lib(error_code.obj)

:-1: WARNING: LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library

debug\loader.exe:-1: ERROR: LNK1169: one or more multiply defined symbols found

when I try to compile something like:

#include <QtGui/QApplication>
#include <iostream>

#include <boost/filesystem.hpp>

int main(int argc, char *argv[])
{
    boost::filesystem::path p;
}

So I wonder how shall I change my .proo file to link correctly to static boost compiled for VC using Qt Creator that is using VS compiler?

  • 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-06-02T19:12:57+00:00Added an answer on June 2, 2026 at 7:12 pm

    If you built boost with the --runtime-link=static flag then they were compiled against the static CRT libraries, i.e. using the /MT (and /MTd for debug) compiler flags.

    Your errors suggest your project is trying to link with the dynamic CRT lib, i.e. using /MD and /MDd. If these are set in your .pro file, they will be a part of the QMAKE_CXXFLAGS_RELEASE and QMAKE_CXXFLAGS_DEBUG variables. They might however not be listed at all – I think the default is to use the dynamic CRT lib.

    All the libraries in your project need to link against the same CRT.

    You either need to use --runtime-link=shared when building boost (you can still use --link=static to create static boost libs with this option though), or add/change the /MD and /MDd to /MT and /MTd in your .pro file.

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

Sidebar

Related Questions

I am currently working on a project to create simple file uploader site that
Okay, I was able to create a simple Windows Forms project that reproduces some
I would like to use RTTI to examine the types contained within project source
I'm trying to create a simple custom validator for my project, and I can't
In college, my senior project was to create a simple 2D game engine complete
I'm trying to create simple DER decoder - console application that just outputs content
I'm using Rails 3 to create a project that will need a model called
My use-case: I already have a working ASP.NET application I would like to implement
I have a project hosted on GitHub and I would like to work locally
Okay, I'm trying to create a simple app that will draw a shape (I'm

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.