Okay, this is really starting to make me crazy :).
I've done my best to RTFM and I've tried two different compilers and two different machines.
When I try and compile this:
#include "OpenDoor.h"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow)
{
od_control.od_cmd_show = nCmdShow;
}
I get [Linker error] undefined reference to `_imp__od_control'
I can reference all the OD Functions. In fact, I've already written a mini door while avoiding the od_controls. I had to use an older .lib because no matter what I do, I get invalid file from the one on the CVS.
Deuce suggested compiling the whole library on my system. If that's the onl way, then that will open a whole 'nother box of questions. I'm hoping someo has a valid .lib of dev-c++ or visual studio, or can tell me that I'm missin ; and I'm just dumb.
Either way, any help would be appreciated :).
I can reference all the OD Functions. In fact, I've already written a mi door while avoiding the od_controls. I had to use an older .lib because matter what I do, I get invalid file from the one on the CVS.
Probably because you're building with MSVC which only supports COFF and the .lib in CVS is in OMF (Borland) format. Or vice-versa. If you're building wi Borland, you can use the Borland "implib" utility to create an OMF import libary (.lib) file for any DLL by running the commandline 'implib -a file.li file.dll'.
Check the symbols in the DLL (using Microsoft depends.exe or something similiar) and make sure that _imp__od_control exists in it. If it doesn't, t the code you're compiling isn't generating the correct variable-name referen in your .obj file.
Re: OpenDoors Question
By: Digital Man to The Lizard Master on Wed Dec 13 2006 04:31 pm
I can reference all the OD Functions. In fact, I've already written a door while avoiding the od_controls. I had to use an older .lib becau matter what I do, I get invalid file from the one on the CVS.
Probably because you're building with MSVC which only supports COFF and t .lib in CVS is in OMF (Borland) format. Or vice-versa. If you're building Borland, you can use the Borland "implib" utility to create an OMF import libary (.lib) file for any DLL by running the commandline 'implib -a file file.dll'.
Okay, well in DEV-C I can add an older .lib and at least compile so this mak sense. If this is the case how do I create the import lib in MSVC or DEV-C?
Ive tried:
#import "odoors62.dll"
But I get too many errors and then it fails.
Check the symbols in the DLL (using Microsoft depends.exe or something similiar) and make sure that _imp__od_control exists in it. If it doesn't the code you're compiling isn't generating the correct variable-name refe in your .obj file.
Ok. Ill try this as soon as I can, thanks.
Sysop: | MCMLXXIX |
---|---|
Location: | Prospect, CT |
Users: | 325 |
Nodes: | 10 (0 / 10) |
Uptime: | 95:34:14 |
Calls: | 506 |
Messages: | 219600 |