Object and Library Files and LD
Posted: Tue Nov 05, 2002 6:24 am
Hi,
I am having problems with linking .o and .lib files using LD. If I have a bunch of .o files and I want to put them all in a .lib file it compiles the .lib file properly, but when I try and link it with some code it says that some of the functions are undefined, I know for a fact that they are in the library because I open it in a text editor and check, I have the functions prototyped and it just will not work. If however the .o file is linked directly, everything works properly. It even works if I make the .lib file out of the single .o file, but as soon as I add more than 1 .o file it will not work.
Is there something that I am doing wrong?
thanks.
I am having problems with linking .o and .lib files using LD. If I have a bunch of .o files and I want to put them all in a .lib file it compiles the .lib file properly, but when I try and link it with some code it says that some of the functions are undefined, I know for a fact that they are in the library because I open it in a text editor and check, I have the functions prototyped and it just will not work. If however the .o file is linked directly, everything works properly. It even works if I make the .lib file out of the single .o file, but as soon as I add more than 1 .o file it will not work.
Is there something that I am doing wrong?
thanks.