Undefined Reference (newbie) solved & followup question

From my previous post. I was linking the wrong file. The correct linkage (or at least one that compiled)
g++ test.cpp -lboost_thread-gcc-mt-d-1_33_1 A few more questions. There is also a libboost_thread-gcc-mt-d-1_33_1.so file. What is the -d represent?? Why does the linker not know to use the given library? Based on other sources I put the path /usr/local/lib in my /etc/ld.so.conf file and then ran /sbin/ldconfig What do I need to do so that I do not have to include all the boost libraries in the compile line? Thanks much. Steve

mailbox44@swissmail.org wrote:
A few more questions.
There is also a libboost_thread-gcc-mt-d-1_33_1.so file. What is the -d represent??
http://boost.org/more/getting_started.html#Results
Why does the linker not know to use the given library?
That's a question for the GCC and/or binutils group.
What do I need to do so that I do not have to include all the boost libraries in the compile line?
Ask the GCC and binutils (and probably many other Unix vendors and tool writers) to implement autolinking. -- -- 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

On Mon, Jan 01, 2007 at 10:32:35PM -0600, Rene Rivera wrote:
What do I need to do so that I do not have to include all the boost libraries in the compile line?
Actually, autoconf/automake can do much of that for you in many cases. This is a good place to get a handle on the tools. http://sources.redhat.com/autobook/autobook/autobook_toc.html Then you can check out the boost macros. http://autoconf-archive.cryp.to/macros-by-category.html#BOOST Set them up in your configure.ac, and do something in your Makefile.am like this(in this case I needed boost_program_options and boost_date_time): progname_CPPFLAGS = @BOOST_CPPFLAGS@ progname_LDFLAGS = @BOOST_LDFLAGS@ progname_LDADD = @PTHREAD_CFLAGS@ @BOOST_PROGRAM_OPTIONS_LIB@ @BOOST_DATE_TIME_LIB@ You'll then use configure to generate much of what you're looking for on most modern systems. There's a bit of a learning curve to it, but using autoconf has saved me a LOT of time over the past few years. Pete

pete@mu.org wrote:
On Mon, Jan 01, 2007 at 10:32:35PM -0600, Rene Rivera wrote:
What do I need to do so that I do not have to include all the boost libraries in the compile line?
Actually, autoconf/automake can do much of that for you in many cases.
Yes, with considerable extra pain. Boost.Build can do the same with considerably less pain... But that's not what the OP asked about ;-) -- -- 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

On Mon, Jan 01, 2007 at 11:01:20PM -0600, Rene Rivera wrote:
pete@mu.org wrote:
On Mon, Jan 01, 2007 at 10:32:35PM -0600, Rene Rivera wrote:
What do I need to do so that I do not have to include all the boost libraries in the compile line?
Actually, autoconf/automake can do much of that for you in many cases.
Yes, with considerable extra pain. Boost.Build can do the same with considerably less pain... But that's not what the OP asked about ;-)
It's only extra pain to learn it, but in the end, it's quite useful. It also helps in a load of other apps that use autoconf. I'm sure boost.build is great, but autoconf is so prevalent, I started with that. I'm just trying to be helpful. Those kinds of problems he's having used to be a part of my life until I started using autoconf. Those issues went away 99%, and it helps a great deal in the opensource experience to know it. autoconf/automake/etc... are incredibly powerful and ubiquitous. There are a lot of good ways to deal with that, but "waiting" for someone else to fix it, doesn't really solve the problem in helpful many. So, instead of passing the buck, I was trying to let him know what has helped me. That's my 2 cents, Pete
participants (3)
-
mailbox44@swissmail.org
-
pete@mu.org
-
Rene Rivera