[Building 1.34] Linking against 1.33.1 and/or 1.34
Is it possible to configure Boost so that the library files built (linux, gcc 4.1) are *not* named like My problem: Boost 1.33.1 libs are a.t.m. named like libboost_regex-gcc.so Boost 1.34.0 libs are now named like libboost_regex-gcc41.so Consequently, my makefile that contain lines like -lboost_regex-gcc do not work with 1.34. If I 'fix' them for 1.34 my other machines (and colleagues) will be in trouble til they switch to 1.34 as well. Question: Is it possible to build boost (or write my makefiles) in a way so that my projects build with both Boost 1.33.1, 1.34 and so on (whatever is present)? Is there a standard or best practice for that? Thank you and best regards Christoph
Christoph Duelli wrote:
Is it possible to configure Boost so that the library files built (linux, gcc 4.1) are *not* named like
My problem: Boost 1.33.1 libs are a.t.m. named like libboost_regex-gcc.so Boost 1.34.0 libs are now named like libboost_regex-gcc41.so Consequently, my makefile that contain lines like -lboost_regex-gcc do not work with 1.34. If I 'fix' them for 1.34 my other machines (and colleagues) will be in trouble til they switch to 1.34 as well.
Question: Is it possible to build boost (or write my makefiles) in a way so that my projects build with both Boost 1.33.1, 1.34 and so on (whatever is present)? Is there a standard or best practice for that?
The boost macros at the autoconf library are pretty good if you're using autoconf: http://autoconf-archive.cryp.to/. I had to add one case to AX_BOOST_FILESYSTEM to cope with 1.34 in the line that starts "for ax_lib in... ", so I expect that will be true for the other libraries too, but at least it has the logic to look for something that works! Rupert
Christoph Duelli wrote:
Is it possible to configure Boost so that the library files built (linux, gcc 4.1) are *not* named like
My problem: Boost 1.33.1 libs are a.t.m. named like libboost_regex-gcc.so Boost 1.34.0 libs are now named like libboost_regex-gcc41.so Consequently, my makefile that contain lines like -lboost_regex-gcc do not work with 1.34. If I 'fix' them for 1.34 my other machines (and colleagues) will be in trouble til they switch to 1.34 as well.
Question: Is it possible to build boost (or write my makefiles) in a way so that my projects build with both Boost 1.33.1, 1.34 and so on (whatever is present)? Is there a standard or best practice for that?
The default build of Boost puts version number for both the compiler and Boost itself in the name so that such discrepancies are not possible. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo
I too have a similar problem as Christoph. In my case I'm always using version 1.34, but I'm building on different machines that have different versions of the gcc compiler. I want to write just one makefile that will find the boost libraries without needing to specify the version of the compiler being used. In other words, if gcc 4.0 is being used, the makefile should locate a library with the toolset part of the name being "gcc40". Similarly if gcc 4.1 is being used, it would specify "gcc41". Do I actually need to modify my makefile to figure out what gcc version I'm using and construct the library name dynamically? I preferred the 1.33.1 and older method of just having the toolset being "gcc" in the libraries file name. Christoph Duelli wrote:
Is it possible to configure Boost so that the library files built (linux, gcc 4.1) are *not* named like
My problem: Boost 1.33.1 libs are a.t.m. named like libboost_regex-gcc.so Boost 1.34.0 libs are now named like libboost_regex-gcc41.so Consequently, my makefile that contain lines like -lboost_regex-gcc do not work with 1.34. If I 'fix' them for 1.34 my other machines (and colleagues) will be in trouble til they switch to 1.34 as well.
Question: Is it possible to build boost (or write my makefiles) in a way so that my projects build with both Boost 1.33.1, 1.34 and so on (whatever is present)? Is there a standard or best practice for that?
Thank you and best regards Christoph
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (4)
-
Christoph Duelli
-
Ken Roser
-
Rene Rivera
-
Rupert Swarbrick