I'm a new Linux's programmer.
I have a problem when i try to compile smile.
Detail of my problem.
* I downloaded smile_1_1_linux_gcc_4_1_1.tar.gz
* My machine is ubuntu7.10 and gcc version 4.1.3
* My program as follow (stest.cpp)
#include "smile.h"
int main()
{
DSL_network theNet;
};
* I try to compile with -c, it is ok
jack@jack-710:~/smile1_1$ gcc stest.cpp -c
* but i try to build it shown error like this
jack@jack-710:~/smile1_1$ gcc stest.cpp
/tmp/ccYFYbbP.o: In function `main':
stest.cpp:(.text+0x1e): undefined reference to `DSL_network::DSL_network()'
stest.cpp:(.text+0x2c): undefined reference to `DSL_network::~DSL_network()'
/tmp/ccYFYbbP.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
* and i try to build again with -l, (i also copy libsmile*.a to /usr/lib)
jack@jack-710:~/smile1_1$ gcc stest.cpp -l smile
but it show a lot of error
what should i do?
Thank you in advance.
How to compile smile?
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: How to compile smile?
Use g++ instead of gcc in the command line.