Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Mar 2002 08:14:10 +0100
From:      "Simon 'corecode' Schubert" <corecode@corecode.ath.cx>
To:        hackers@freebsd.org
Subject:   bsd.prog.mk doesn't link c++ programs correctly?
Message-ID:  <20020330081410.5af6f2da.corecode@corecode.ath.cx>

next in thread | raw e-mail | index | archive | help
--=.6w+MHe:WA?INYG
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

hi hackers!

i'm in progress in writing a c++ program utilizing bsd.prog.mk

i wondered why my programs won't link correctly when i don't add a line
LDFLAGS=-lstdc++
no i was trying out gcc30 (whoa, slow!) and it didn't want to link with
or without the above line.

it seems c++ programs need to be linked via g++ (or c++).
after delting the above line and inserting a
CC=${CXX}
everything works fine, but that's not nice, of course.

is there any specific reason why linking is done with ${CC}?
there should be a way to tell that one needs ${CXX} for linkage.

cheerz
  simon

-- 
/"\   http://corecode.ath.cx/
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News

--=.6w+MHe:WA?INYG
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)

iD8DBQE8pWXIr5S+dk6z85oRAkcHAJ4x3jwzTLgo9L3v6hQWUN8DVrgB9QCfbf4X
8k9tD1XV+7q/r3qBAkvQccY=
=vpeu
-----END PGP SIGNATURE-----

--=.6w+MHe:WA?INYG--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020330081410.5af6f2da.corecode>