Re: linking against c++ shared library built using autoconf (and libtool)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Today, 36 minutes, 53 seconds ago, William Turner wrote:
> 3) The only lines during the build process which use gcc instead of g++ 
> are those lines that produce the library. All client application 
> compiles/links are done with g++ (I'm not using autoconf for that app).

Does the library's `configure.ac' says `AC_LANG_CPLUSPLUS'?  Well, I
guess it probably does since otherwise g++ wouldn't be used at all.
Does it contain C sources as well?

> 4) Adding an explicit -lstdc++ to the client application build line (as 
> was suggested) does nothing.

What do you mean by "nothing"?  :-)

> 5) If I edit the Makefile for the library so that CC=g++, and rebuild 
> the library, everything works- this seems to force automake to do the 
> right thing and link with g++ (since suddenly it doesn't know gcc 
> exists anymore). However, hand-editing of Makefiles isn't really what I 
> was looking for when using autoconf/automake. Is there a way to force 
> this behaviour via my configure.ac file?

You can set `CC=g++' within the `Makefile.am' instead of the raw
Makefile.

Ludovic.


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux