boost_program_options-mt not found when compiling with Boost 1.49.0

1,859 views
Skip to first unread message

Troy Hawkins

unread,
Apr 26, 2012, 12:35:13 PM4/26/12
to lib...@googlegroups.com
I know this has been posted a couple of times for earlier versions of Boost libraries, but I am having the same issue and it seems the solution may be slightly different with the new version.

When I compile I get this error:

g++ -Iinclude -I/[masked]/lib/boost_1_49_0 -Wno-deprecated -Wall -W -Wextra -fpic -O3 -g -DDAI_DEBUG  -DDAI_WITH_BP -DDAI_WITH_FBP -DDAI_WITH_TRWBP -DDAI_WITH_MF -DDAI_WITH_HAK -DDAI_WITH_LC -DDAI_WITH_TREEEP -DDAI_WITH_JTREE -DDAI_WITH_MR -DDAI_WITH_GIBBS -DDAI_WITH_CBP -DDAI_WITH_DECMAP -Llib -L/[masked]/lib/boost_1_49_0 -otests/testdai tests/testdai.cpp -ldai -lgmpxx -lgmp -lboost_program_options-mt
/usr/bin/ld: cannot find -lboost_program_options-mt
collect2: ld returned 1 exit status
make: *** [tests/testdai] Error 1

There is a folder structure in BOOST_ROOT for boost/program_options/ but no .so file as I have seen mentioned previously. Does anybody know whether this is something that has changed in the recent versions and needs to be updated with the compile commands or am I just missing something? I've been messing around with it fr a while but seem to be stuck and would appreciate the help.

Troy

Joris Mooij

unread,
Apr 27, 2012, 4:43:41 AM4/27/12
to Troy Hawkins, lib...@googlegroups.com
Dear Troy,

My linux distribution (debian) supplies prebuilt boost libraries. I currently
have version 1.49.0 installed, and this includes .so files for libboost_program_options-mt.

You could try to remove the "-mt" suffix.

But if you don't find any libboost_program_options*.* anywhere below the boost
root, either you may have installed them somewhere else (check your boost
build configuration) or they haven't been built yet.

I don't have any personal experience in building boost libraries version 1.49.0,
but maybe somebody else has.

Good luck,
Joris
> --
> You received this message because you are subscribed to the Google Groups
> "libDAI" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/libdai
> /-/J_i0lRvO4XgJ.
> To post to this group, send email to lib...@googlegroups.com.
> To unsubscribe from this group, send email to
> libdai+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/libdai?hl=
> en.

Troy Hawkins

unread,
Apr 27, 2012, 10:58:23 AM4/27/12
to lib...@googlegroups.com, Troy Hawkins
Ah, looks like the program_options library has to be built separately. While setting up the boost libs I saw a note that said nothing needed to be built and skipped on to the next step without reading any further. Lesson learned! Thanks for your quick reply.

Troy

Troy Hawkins

unread,
Apr 27, 2012, 12:10:18 PM4/27/12
to lib...@googlegroups.com, Troy Hawkins
Just to update for the thread and future reference for anyone facing this same problem:

If you are having to set up the Boost libs yourself on a Unix variant, soem of the libs have to be built separately, including boost_program-options and boost_unit_test_framework. Once these are built and the Makefile.conf is updated with the proper include and library paths, the names of these two need to be changed to reflect the file names in the lib directory where they were built. In my case, I had to remove the '-mt' before the libDAI make could complete successfully.

Feel free to reply to this thread if you are having trouble with this. I will follow by email to catch any replies that come through.

Troy

parado...@gmail.com

unread,
Dec 4, 2012, 1:42:23 PM12/4/12
to lib...@googlegroups.com, Troy Hawkins
Hi Troy,

I posted a thread recently and it appears that I have progressed to the point of being at this issue.  I have looked around to find how to build these two libraries, but can't seem to find a clear set of instructions so far.  Any help would be greatly appreciated.

Thanks,
Mike

Mohit Joshi

unread,
Jan 15, 2022, 10:45:22 AM1/15/22
to libDAI
Hi Folks,

I am trying to make a program which fails with the error "Missing boost_program_options-mt" on Boost 1.73.0. I am trying to build on MacOS (12.1) M1
Please help.

Reply all
Reply to author
Forward
0 new messages