dll and classes question

This is a discussion on dll and classes question within the C++ Programming forums, part of the General Programming Boards category; I am making a directx rapper engine type thing but I have this problem. I have the engine.h file wich ...

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    731

    dll and classes question

    I am making a directx rapper engine type thing but I have this problem.

    I have the engine.h file wich contains the definition of the class. But in the definiton of the class it uses directx return types, wich makes the user of the engine have to have the directx header and lib files. I want it so you can just link the engine to your project and use without having the directx stuff. Is that possible?

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    *unsure*
    Would extern work

  3. #3
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    Heres my extern definition code:

    Code:
    #ifdef D3DENGINE_EXPORTS
    #define DLLEXPORT __declspec(dllexport)
    #else
    #define DLLEXPORT __declspec(dllimport)
    #endif
    Basicly the first if is for the engine, the second one is for the project using the engine. I don't belive that is the solution cause I already have that.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 05:30 PM
  2. loading a dll with classes
    By *DEAD* in forum C++ Programming
    Replies: 2
    Last Post: 06-22-2007, 12:27 AM
  3. DLL question
    By cboard_member in forum Game Programming
    Replies: 1
    Last Post: 04-24-2006, 03:19 AM
  4. Exporting VC++ classes for use with VB
    By Helix in forum Windows Programming
    Replies: 2
    Last Post: 12-29-2003, 05:38 PM
  5. Exporting Object Hierarchies from a DLL
    By andy668 in forum C++ Programming
    Replies: 0
    Last Post: 10-20-2001, 02:26 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21