What about putting -lstring_s to the command line? Gabor
"jml" <[EMAIL PROTECTED]> wrote in message news:b0opmr$[EMAIL PROTECTED]... > Hi, > I try to compile some code on Linux, but don't know how to make it pass gcc. > > The code is a very simple 6 line cpp file "testmain.cpp" > ---------------------------------------------- > #include <nsEmbedString.h> > int main() > { > nsEmbedCString* s = new nsEmbedCString("hello world"); > delete s; > } > ---------------------------------------------- > > I try to compile use: > > gcc -DXPCOM_GLUE -I/usr/include/mozilla-1.2.1/nspr/ > -I/usr/include/mozilla-1.2.1/string -I/usr/include/mozilla-1.2.1/xpcom > -lxpcom -lstdc++ -L/mozilla/sdk/lib -lxpcomglue_s testmain.cpp > > output is: > /tmp/ccOyiKd2.o: In function `main': > /tmp/ccOyiKd2.o(.text+0x30): undefined reference to > `nsEmbedCString::nsEmbedCString[in-charge](char const*)' > collect2: ld returned 1 exit status > > > I also tried -lxpcomglue instead of -lxpcomglue_s, also fail with same > problem. > > I must be missing something, someone please help. > > jml >
