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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:46:31+00:00 2026-06-10T01:46:31+00:00

For almost three days now I have been trying to get the boost libs

  • 0

For almost three days now I have been trying to get the boost libs working properly in CodeBlocks using mingw. In between many of the problems that I managed to fix by myself, now I’m stuck and it’s driving me mad.

I have built the library many many times with different flags sent to bjam but every time I use these libs in CodeBlocks I get the same result. A lot of lines with

undefined reference to `___gxx_personality_sj0'
undefined reference to `__Unwind_SjLj_Register'
undefined reference to `__Unwind_SjLj_Resume'
undefined reference to `__Unwind_SjLj_Unregister'

Before people start lashing out at me, I have searched for the problem before coming here. Almost all the threads (here and here and others) say that this problem comes from the fact that boost was built with a compiler and now I am trying to use another different compiler in CodeBlocks. I have checked time and time again and I only have one MinGW installation available. I have checked my Path variable and nothing unwanted is in there, only the bin folder of the MinGW that I want to use. I don`t have any QT installation so no second MinGW from there. Also, I downloaded the CodeBlocks without the bundled MinGW.

Below I will list the steps I take:

1) bootstrap.bat mingw which builds bjam

2) bjam --toolset=gcc "--prefix=<installpath>" install as stated here

3) follow the rest of the steps from the link from step 2)

4) add Boost.Filesystem, Boost.System, Boost.DateTime, Boost.Thread and Boost.Regex (dependencies for Boost.Log taken from here)

5) copy/paste this example

The command that CodeBlocks uses when I try to Build:

mingw32-g++.exe -Wall -fexceptions -g
-ID:\libs\boost\include\boost-1_51 -c D:\example\example\main.cpp -o obj\Debug\main.o

mingw32-g++.exe -LD:\libs\boost\lib -o bin\Debug\example.exe
obj\Debug\main.o
D:\libs\boost\lib\libboost_filesystem-mgw44-mt-d-1_51.a
D:\libs\boost\lib\libboost_system-mgw44-mt-d-1_51.a
D:\libs\boost\lib\libboost_date_time-mgw44-mt-d-1_51.a
D:\libs\boost\lib\libboost_thread-mgw44-mt-1_51.a
D:\libs\boost\lib\libboost_regex-mgw44-mt-d-1_51.a
D:\libs\boost\lib\libboost_log_setup-mgw44-mt-d-1_51.a

What else could be the cause of this?

Later added:

CodeBlocks toolchain executables are:

c++ compiler: mingw32-g++.exe
linker for dynamic libs: mingw32-g++.exe
linker for static libs: ar.exe

All .EXEs are where they should be but added this info maybe it is important.

  • 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-10T01:46:32+00:00Added an answer on June 10, 2026 at 1:46 am

    Fixed the problem. After Mankarse asked me about the gcc version I checked and it was the same as used to compile the libs (4.4). I decided to upgrade to the latest version (4.7) and try again. After updating I noticed that the compiled libs still had mgw44 in their names which made me think that maybe I did have a second mingw installation.

    After checking out every folder I had in my Path variable, I came to the conclusion that Strawberry Perl which I had installed some weeks ago, also came bundled with a version of gcc. After I removed it and rebuilt boost from sctratch, the errors vanished.

    For future reference if someone comes across this problem again and is sure that he only has one mingw, just check again like this:

    1. remove the bin folder with mingw exes from your Path variable

    2. open a command prompt and type g++. If it say something like g++: fatal error: no input files then you have more than one mingw installations.

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

Sidebar

Related Questions

I have been struggling for almost three days now on this task, and I
I have been struggling for days to get a working upload onto the admin
Almost every game use keyboard as input. I have been searching for 2 days
This has been bugging me for a few days now. I'm trying to migrate
From few days content assist has been working very slow and it almost takes
I have been trying to display a table of results for weekly sales using
I've been using Resharper for a few days and I really like this tool,
I have been using Emacs since version 18. Emacs Lisp isn't my routine programming
We're currently using Salesforce for our sales process, which involve trying to get people
I've been using Django for a couple of days & setup a basic blog

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.