• OpenDoors Question

    From The Lizard Master@VERT/NITEEYES to All on Wednesday, December 13, 2006 18:23:00
    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 only way, then that will open a whole 'nother box of questions. I'm hoping someone has a valid .lib of dev-c++ or visual studio, or can tell me that I'm missing a ; and I'm just dumb.

    Either way, any help would be appreciated :).

    Thanks!

    ---TLM
    www.LizardMaster.com

    ---
    þ Synchronet þ Nite Eyes BBS 24/7 Doors/Message Bases/C=64 niteeyes.etowns.net
  • From Digital Man@VERT to The Lizard Master on Wednesday, December 13, 2006 16:31:08
    Re: OpenDoors Question
    By: The Lizard Master to All on Wed Dec 13 2006 06:23 pm

    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.

    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 with 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.lib file.dll'.

    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 :).

    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, then the code you're compiling isn't generating the correct variable-name references in your .obj file.

    digital man (xbox-live: digitlman)

    Snapple "Real Fact" #58:
    A sneeze travels out of your nose at 100mph.
    Norco, CA WX: 78.0øF, 73% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From The Lizard Master@VERT/NITEEYES to Digital Man on Wednesday, December 13, 2006 21:58:00
    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 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'.

    Okay, well in DEV-C I can add an older .lib and at least compile so this makes sense. If this is the case how do I create the import lib in MSCV 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, t the code you're compiling isn't generating the correct variable-name referen in your .obj file.


    Ok. Ill try this as soon as I can, thanks.

    ---TLM
    www.LizardMaster.com

    ---
    þ Synchronet þ Nite Eyes BBS 24/7 Doors/Message Bases/C=64 niteeyes.etowns.net
  • From Digital Man@VERT to The Lizard Master on Thursday, December 14, 2006 14:20:40
    Re: OpenDoors Question
    By: The Lizard Master to Digital Man on Wed Dec 13 2006 09:58 pm

    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?

    I'm pretty sure only Borland and Microsoft compiles are currentlys supported by OpenDoors. When linking a DLL with MSVC, it should automatically create the import libary (.lib file) for the DLL. I don't know the equivalent of 'implib' in MSVC, or if there is one.

    Ive tried:
    #import "odoors62.dll"

    From the MSDN:

    The #import Directive

    C++ Specific

    Used to incorporate information from a type library. The content of the type library is converted into C++ classes, mostly describing the COM interfaces.

    ** This is not what you're looking for.

    But I get too many errors and then it fails.

    Yeah, I bet. :-)

    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.

    Good luck!

    digital man (xbox-live: digitlman)

    Snapple "Real Fact" #32:
    There are one million ants to every human in the world.
    Norco, CA WX: 94.2øF, 25% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net