Date: Sun, 31 Mar 2002 13:27:30 -0700 (MST) From: "M. Warner Losh" <imp@village.org> To: corecode@corecode.ath.cx Cc: hackers@FreeBSD.ORG Subject: Re: bsd.prog.mk doesn't link c++ programs correctly? Message-ID: <20020331.132730.48528141.imp@village.org> In-Reply-To: <20020330081410.5af6f2da.corecode@corecode.ath.cx> References: <20020330081410.5af6f2da.corecode@corecode.ath.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20020330081410.5af6f2da.corecode@corecode.ath.cx> "Simon 'corecode' Schubert" <corecode@corecode.ath.cx> writes: : 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. I think that it is very difficult to tell if a program is a C++ program easily, so the CC hack is what is generally used. Warner 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?20020331.132730.48528141.imp>