1

I've compiled a Linux package on ubuntu 12.04 which uses boost and on this system i have boost 1.46. I tried to run the compiled release on another system and it complains that it can't find libboost_system.so.1.46.1. That system has boost 1.49 installed. How do I compile so that the program uses whatever version of boot exists instead of the specific version on the development machine.

trashrobber
  • 727
  • 2
  • 9
  • 26

1 Answers1

1

You cannot expect your program to work with a different version of the library.

The fact that there are /different/ versions implies that they're /not the same/.

As mentioned, either

  • statically link to your specific version, or
  • you can ship the shared libraries (as long as you put them in a app-specific location and make sure you find them at runtime). Incidentally, see the second example here: How to compile boost async_client.cpp for the relevant linker options to use a custom library (it assumes the same location is to be used at runtime (rpath)
Community
  • 1
  • 1
sehe
  • 374,641
  • 47
  • 450
  • 633