what is the difference of these two compile methods ?

2006-08-02 Thread
source file is a very simple cpp file like hello world whose name is main.cpp when i compile it with: g++ -o test.exe main.cpp it works fine but when i compile it with: g++ -c -o main.o main.cpp ld -o test.exe main.o it will report undefined reference error at step 2, it looks like ld can not

how can i search a specific symbol in static library ?

2006-07-25 Thread
there are many static library files in lib directory, when i was reported a error: undefined reference to X how could i know which static library file(.a file) should i append to compile path by parameter L l is there a convenient way to search a specific symbol in a directory? --