From: camilo r. <cr...@co...> - 2000-10-31 08:50:04
|
Hello all, I was wondering about the following: Can one statically link in *.lib import library files produced by Visual C++? Note that the object files that would be used to produce the *.lib are not part of a DLL, neither there would be a DLL equivalent to such *.lib file. Just the archived objects the way one can do it in Unix with an *.a archive file for static linking. Is this possible? Any suggestions thanked. Best regards, camilo mailto:cr...@co... |
From: Greg C. <chi...@mi...> - 2000-10-31 10:00:24
|
camilo ramos wrote: > > I was wondering about the following: Can one statically link in *.lib > import library files produced by Visual C++? Note that the object files > that would be used to produce the *.lib are not part of a DLL, neither > there would be a DLL equivalent to such *.lib file. Just the archived > objects the way one can do it in Unix with an *.a archive file for > static linking. If the code were in a DLL, then you could use an 'import library' to tell your program how to call the functions in the DLL. I think you'd have to create the import library yourself using dlltool in order to use it with mingw. You should be able to call extern "C" functions in the DLL no matter what compiler it was built with. If the code is in the library file itself, then that's a 'static library'--just a collection of objects. The object file format is incompatibly different for each compiler I know of, so you cannot link an msvc static library to a mingw app. |
From: Paul S. <pa...@is...> - 2000-10-31 15:52:36
|
Hello camilo, camilo ramos <cr...@co...> wrote: cr> Hello all, cr> I was wondering about the following: Can one statically link in *.lib cr> import library files produced by Visual C++? Note that the object files cr> that would be used to produce the *.lib are not part of a DLL, neither cr> there would be a DLL equivalent to such *.lib file. Just the archived cr> objects the way one can do it in Unix with an *.a archive file for cr> static linking. cr> Is this possible? That's exactly what recently released alapha binutils might be good for. Danny, can you confirm this? cr> Any suggestions thanked. cr> Best regards, cr> camilo mailto:cr...@co... -- Paul Sokolovsky, IT Specialist http://www.brainbench.com/transcript.jsp?pid=11135 |