Hi. I enjoy boost library these days, and really appreciate it. However, sometimes, I found it very hard to even compile a program that uses boost libraries. As an example, serialization library needs libboost_serialization.so. Hence, I have to compile a program like the following: g++ -lboost_serializatino foo.cpp Nevertheless, AFAIK, nowhere in the document, how to compile a program is not presented. Some of the docs even mention the header file. I don't know why this is so common in the documentation of boost, and I think mentioning how to compile will be very useful for users. So, please, please put some 'how to compile' section especially if the library needs -lxxx_library flag. I really thank boost developers' time and efforts. Sincerely, Minkoo Seo -- View this message in context: http://www.nabble.com/Documentation-Suggestion.-tf2189683.html#a6058183 Sent from the Boost - Users forum at Nabble.com.
Minkoo Seo wrote:
I enjoy boost library these days, and really appreciate it.
However, sometimes, I found it very hard to even compile a program that uses boost libraries. As an example, serialization library needs libboost_serialization.so.
Hence, I have to compile a program like the following: g++ -lboost_serializatino foo.cpp
Nevertheless, AFAIK, nowhere in the document, how to compile a program is not presented. Some of the docs even mention the header file. I don't know why this is so common in the documentation of boost, and I think mentioning how to compile will be very useful for users.
So, please, please put some 'how to compile' section especially if the library needs -lxxx_library flag.
I really thank boost developers' time and efforts.
Hi, Recently, I also meet similar problem and had troubles with figure out what Boost library requires linking and what is headers-based. Following table may help in this: http://www.boost.org/more/getting_started.html#auto-link but some additional building details in per-library docs would be much more helpful So, I'd like to vote for Minkoo's suggestion. Hmm, or it's already documented but we've not found it yet? Cheers -- Mateusz Loskot http://mateusz.loskot.net
On 8/30/06, Minkoo Seo
Hence, I have to compile a program like the following: g++ -lboost_serialization foo.cpp
Be warned, if you have static libraries that wont work and you'll need the following instead: g++ foo.cpp -lboost_serialization ( This just came up in Freenode/#boost yesterday. ) ~ SWMc
me22 wrote:
On 8/30/06, Minkoo Seo
wrote: g++ -lboost_serialization foo.cpp g++ foo.cpp -lboost_serialization
I'm sorry, but what is the difference between them? - Minkoo Seo -- View this message in context: http://www.nabble.com/Documentation-Suggestion.-tf2189683.html#a6061644 Sent from the Boost - Users forum at Nabble.com.
On 8/30/06, Minkoo Seo
I'm sorry, but what is the difference between them?
From #boost : <> How can I determine which libraries I need to link against for any given boost library? <> I'm trying to use serialization and I linked against
g++ processes arguments left-to-right. libboost_serialization.a but the linker is still unable to locate a whole bunch of symbols. <me> did you have the lib before or after the object that uses it on the command line? <> before <me> put it after <> Awesome. Thanks. <me> it only takes the stuff it knows it needs from the .a <me> and before your object files, it doesn't need anything from the .a <> If the .a is really big, but I'm only using one function from it, does it need to include the entire .a, or does it only include that function that I need? <me> I'm fairly certain that it'll only take the needed bits from a .a <me> if it took everything it wouldn't matter where in the argument list it was I don't think you have a problem with this, but if it's going into the docs it's an important distinction. ~ SWMc
participants (3)
-
Mateusz Loskot
-
me22
-
Minkoo Seo