HI, I have a problem in linking some .o object to the executable file in linux (fedora). com.o uiciname.o uici.o restart.o are written in c and I use gcc to compile them. but client.o is a fltk program. and I use g++ to compile it. here is the out put of the make:
g++ -o Client client.o com.o uiciname.o uici.o restart.o -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lfltk -lfltk_images -lm -lXpm -lpng -lz -ljpeg client.o: In function `main': client.cxx:(.text.startup+0x3bb): undefined reference to `connectToServer(char const*, unsigned short, char const*, char const*)' client.cxx:(.text.startup+0x3e8): undefined reference to `stratChatReceiving(int*, char*)' client.cxx:(.text.startup+0x49f): undefined reference to `startChatSending(int*, char const*)' collect2: ld returned 1 exit status make: *** [Client] Error 1 These functions are defined with extern .. still it is not helping to solve the problem.. It seems that gcc and g++ have different format in the object files .. that is why the linker (g++) will not find the reference in the objects that were compiled by gcc. Dose that mean that I should make a library for the gcc outputs? Any idea is appreciated. _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk