(saw the new symposium, so i moved the thread over to this one)
hi all,
how do you get gcc to build a mixed c/c++ program?
i'm using rpcgen to build a networking app on a solaris machine (gcc version 2.95.2).
running rpcgen on my .x file creates the following C files for me
remote_db_clnt.c
remote_db_svc.c
remote_db_xdr.c
remote_db.h
the app involves database'ish code, so i decided to use the string class and map provided by the STL in C++. but i'm having issues building the app using gcc.
% gcc -x c++ remote_db_server.cpp -x c remote_db_svc.c -x cremote_db_xdr.c -lnsl -lsocket
produces the following errors:
Undefined first referenced
symbol in file
cout /var/tmp/ccMhmu6j.o
string_char_traits::compare(char const *, char const *, unsigned int)/var/tmp/ccMhmu6j.o
and then some more linker errors. i don't think i'm even really at the point where i'll extern "C" the functions between languages.
does anyonne know how to fix this?
thanks
hi all,
how do you get gcc to build a mixed c/c++ program?
i'm using rpcgen to build a networking app on a solaris machine (gcc version 2.95.2).
running rpcgen on my .x file creates the following C files for me
remote_db_clnt.c
remote_db_svc.c
remote_db_xdr.c
remote_db.h
the app involves database'ish code, so i decided to use the string class and map provided by the STL in C++. but i'm having issues building the app using gcc.
% gcc -x c++ remote_db_server.cpp -x c remote_db_svc.c -x cremote_db_xdr.c -lnsl -lsocket
produces the following errors:
Undefined first referenced
symbol in file
cout /var/tmp/ccMhmu6j.o
string_char_traits::compare(char const *, char const *, unsigned int)/var/tmp/ccMhmu6j.o
and then some more linker errors. i don't think i'm even really at the point where i'll extern "C" the functions between languages.
does anyonne know how to fix this?
thanks