Thread: DLL Problem

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    7

    DLL Problem

    As far as I know I don't need a .DEF file when using the command __declspec(dllexport) before my functions to be exported . what I've read is that this command is MS specific and I'm using it in Dev C++ and am wondering if this would have any impct on the DLL file generated from the complier?

    When I view the file in 'quick view' I see no export table and I've seen sample dll's and the export table is clearly visable. I'm tring to import functions in to HP Vee but it keeps telling me the functions are unloadable. It is only a very simple program at the moment ,with one function.

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I also use mingw and I haven't had any issues with not exporting a .DEF file. However, this is only because I'm careful The best way to avoid problems is the have a header file that has all the prototypes for functions included in both the dll and the program that uses the program. If you don't then sometimes the program will look for a function in the wrong place. Or there is always explicit loading of functions using LoadLibrary() for getting a dll and GetProcAddress() for grabbing the memory location of the dll's functions. I find using LoadLibrary to be a much painless way of doing dll's.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DLL Function / Load Library Problem
    By cboard_member in forum Windows Programming
    Replies: 5
    Last Post: 12-10-2005, 10:11 AM
  2. Replies: 1
    Last Post: 09-18-2005, 09:06 PM
  3. .lib vs .h vs .dll
    By Shadow12345 in forum C++ Programming
    Replies: 13
    Last Post: 01-01-2003, 05:29 AM
  4. std::string vs char* DLL problem
    By aker_y3k in forum C++ Programming
    Replies: 13
    Last Post: 10-02-2002, 09:05 AM
  5. VCL and DLL class problem
    By borland_man in forum C++ Programming
    Replies: 1
    Last Post: 02-13-2002, 11:07 AM