So, i have a DLL that i have tested and i am able to use it. (i do not have the source code, only the .lib and the .dll ).
I would like to create a wrapper around the functions and make a static library of it.
Creating a static library works fine, although if i use any of the functions in the DLL it does not work.
The header for the DLL is something like this:
#ifdef __cplusplus
extern "C"
#endif
#ifdef WIN32 //<< this one is true
#define __API __declspec(dllimport)
#else
#define __API extern
#endif
__API void function_I_would_like_to_use();
I am using VS2012.
So in my project settings i have added the .lib under addition dependencies.
However, how can i tell the compiler to also include the DLL?
As of now it compiles fine , but obviusly i still need the DLL since the functions i would like to use are defined as
dllimport.
Is it possible to import from the DLL and then export it to the static library?
Thx in advance