Sign in to follow this  
Endar

Library compiled incorrectly?

Recommended Posts

I'm working on an individual project for one of my subjects at uni, and it has to do with image processing. To this end, the lecturer has told us that we should be using an image library that was developed at the uni some time ago. When I attmpt to compile my program when calling a particular function, I get this output:
g++ -c -Wall -g seg.cpp
g++ -c -Wall -g main.cpp
g++ -c -Wall -g proj.cpp
g++ -Wall -g main.o seg.o -L/cs/cc/lib/mil/lib -limage -L/usr/X11R6/lib -lX11 -lm -o main
/cs/cc/lib/mil/lib/libimage.a(i_templa.o)(.text+0x4b): In function `i_template':
: undefined reference to `__ctype_b'
/cs/cc/lib/mil/lib/libimage.a(i_templa.o)(.text+0xe9): In function `i_template':
: undefined reference to `__ctype_b'
collect2: ld returned 1 exit status
make: *** [all] Error 1
I'm compiling with gcc on linux. I'm not sure what version of linux because I'm ssh'ing in through Putty. Now, what it looks like (to my untrained eye) is that the library has been improperly compiled. Is this a possibility? I did a quick google, and one of the sites said that it was possible that the compiler isn't linking with the std C libraries properly, but everything else that I'm compiling/linking is working with no problems.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
You'll get this error if the library was compiled with a (very) different libc version than you're using.


So I'm assuming that the only way to rememdy it is to have someone re-compile the library with a more current version of the std C lib?

Share this post


Link to post
Share on other sites
Quote:
Original post by Endar
I'm not sure what version of linux because I'm ssh'ing in through Putty.


uname -a should tell you all you need to know. [smile]

Quote:
So I'm assuming that the only way to rememdy it is to have someone re-compile the library with a more current version of the std C lib?


At least one that matches the one on the system, I guess. Contact the lecturer and tell him the library is broken.

Incidentally, shouldn't you be linking proj.o as well?

Share this post


Link to post
Share on other sites
Quote:
Original post by Fruny
Quote:
Original post by Endar
I'm not sure what version of linux because I'm ssh'ing in through Putty.


uname -a should tell you all you need to know. [smile]

Quote:
So I'm assuming that the only way to rememdy it is to have someone re-compile the library with a more current version of the std C lib?


At least one that matches the one on the system, I guess. Contact the lecturer and tell him the library is broken.


Okay, thanks guys.

Quote:

Incidentally, shouldn't you be linking proj.o as well?


No. 'main.cpp' is going to be compiled to my quick and dirty test executable, which 'proj.cpp' is intended to be the main file for my actual finished app.

Edit::
Linux ra-clay2.its.monash.edu.au 2.6.9-34.ELsmp #1 SMP Tue Mar 14 10:51:18 CST 2006 i686 i686 i386 GNU/Linux

Awesome. [smile]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this