Guillaume Gros writes: > I am not really an advanced user of gcc and I have the following > problem. I have 3 objects files (a driver) and don't have the > source code for it. Another application is using this same driver > but I fail to understand how they managed to use it. > First the other app is performing a partial link of those 3 object > files into a single one. The resulting is driver.o they continue to > do partial linking up to the root directory so driver.o goes into > modules.o That should work, but doesn't seem particularly pointful. > > And finally they use gcc on this modules.o and other .o from other > directories to get the final executable. The switches used with gcc are > "-lpthread -lm -lz -lcrypt -rdynamic -ldl" > > So well in my app I tried to do the same. I partially linked the 3 > objects files to get driver.o. Using 'ld -r', right? We need to know. > but when gcc comes to the linking phase it fails with "undefined > reference to somefunc(int)" > > somefunc is defined in the driver.o file. This is better directed to binutils, but here goes. It's probably a matter of linking order. However, we can't tell because you didn't show us the commands you used. Andrew.