Re: C++ program incorrectly linked as C?

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

 



Hello Natalie,

* Natalie Tasman wrote on Fri, May 21, 2010 at 02:26:02AM CEST:
> > I've set LT_INIT and LT_LANG([C++]); .cxx files are compiled correctly
> > with g++ but linking is happening with gcc and failing (missing all
> > the basic c++ stuff).   I don't know if this is relevant but in
> > Makefile.in the default "LINK" definition uses CC rather than CXX.

> Apologies- this seems to be due to an issue with cross-compiling, not
> with autoconf.

I'm not sure how cross compilation can be the reason, and I'm not sure
whether you're saying you've fixed the issue now; but if you haven't,
then showing the Makefile.am parts relevant for the C++ program as well
as (relevant parts of) a build log would probably help to analyze the
issue.

Automake uses LINK only for linking of C-only code; when it realizes
that C++ is in the game, it will use CXXLINK.  You may need to add
AC_PROG_CXX to configure.ac and run autoreconf for it to set and use
this variable.

(Without knowing what the issue is, it could be due to any of the
autotools; there's really no need to jump to another mailing list
for that, though, IMVHO.)

Hope that helps.

Cheers,
Ralf

_______________________________________________
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