Re: [Dev-C++] Linking errors with winmme and dsound libraries.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <or...@vp...> - 2003-07-17 00:53:42
|
Gabriel Maldonado wrote: > I could never imagine this would cause of the error, becuase in MSVC the > order of the libraries is not significant. This was also the case for GCC (the compiler in Dev-C++) in older versions. I still don't know exactly why they introduced it. As I remember they have done this because of faster "parsing" of libraries: they only need to parse everything once, what was specified on the command line, so there is no need to go through all of them again to resolve remaining undefined references. Anyway, this also has another (in my opinion) good side-effect: this way programmers cannot write cross-referencing libraries. (For example there is -lfoo and -lbar and both reference to each other). Oh well, they can, but then they have to give it on the command line twice: -lfoo -lbar -lfoo -lbar Which is ugly. So keep it in mind: FIRST the library (OR object file, OR surce file) on the command line which USES the stuff, THEN the libraries (OR object files, OR surce files) which CONTAIN the stuff. > I also tried to link the application with the library binaries > originally compiled with MSVC, now I only get the following error: > > ====================== > Info: resolving __iob by linking to __imp___iob (auto-import) > ../../Libraries/tinyAudioLib/release\tinyAudioLib.lib(./pablioLIB_mme___Win32_Release/pa_win_wmme.obj)(.text+0x165):C:\LibroBoulanger\: > > variable '_iob' can't be auto-imported. Please read the documentation > for ld's --enable-auto-import for details. > make.exe: *** [devcpp/hellotableRT.exe] Error 1 > Execution terminated > ====================== > > have you any idea of what this error means? Where is the "detailed > documentation for ld's --enable-auto-import" ? The _iob identifier is > not present in the sources of the tinyAudioLib nor in the main program > soruce file. Is it possible to get rid of such error in a way or another? Well :) This error caused me hours of swearing, until I realised that this is a BUG. Not always, but these errors are because of a 10 months old bug, which is not fixed, not matter how I write that f*ckin' bug-report. Is tinyAudioLib a DLL? In that case, specify the DLL DIRECTLY with the libraries (full path!). This is really odd, I know, but in most of the cases, GCC tends not work correctly with import libraries, especially if they are C++. However, it works perfectly with the DLL directly. This is odd indeed. Good luck! -- Greetings, Balázs |