   No static library please
  I''m trying to call a function from a library without linking to it''s static library, since I could load the DLL at runtime. However, during compilation, I''ve got an errorerror LNK2019: unresolved external symbol _D3DXCreateMatrixStack@8 referenced in function "private: void __thiscall Engine::Device::Init(void)" (?Init@iDevice@iEngine@@AAEXXZ)It compiles fine if I link the library, but I want to keep my *.exe as small as possible. Any ideas?Thanks.   lahuze~i was, i am, i will be..~ 
  Are you using LoadLibrary/GetProcAddress? ;  1) Only the DEBUG version of the D3DX library is supplied as a DLL. The release version is always a static lib. Machines without the DirectX SDK won''t have that DLL. If your code only needs to work on machines with the SDK installed, link with D3DX*D.LIB which is an import library which will define the D3DXCreateMatrixStack() symbol and ensure your code automatically loads the DLL.2) As mentioned. If you don''t want to have any DLL linkage specified in the .EXE, you''ll have to use LoadLibrary() and GetProcAddress() and define YOUR OWN function pointer for the function you want - you have to call through that pointer - you can''t just call the function if it hasn''t been linked as an import.3) Also beware that the exports from the D3DX*D.DLL have C linkage.   --Simon O''Connorex  -Creative AsylumProgrammer &Microsoft MVP;  Thank you!I got it running with LoadLibrary/GetProcAddress, function pointer, bla bla bla routines.I''m pretty new to this, but is there any way that I could compile the static library (release version) and distribute d3dx9.dll? And escape any linkage problem related to this? lahuze~i was, i am, i will be..~;  I was thinking about doing a similar thing myself. I guess you could create a DLL which is linked to the static library, and export all the functions. Use the import library you''ll get to make using this as easy as with a static library.look at http://www.flipcode.com/tutorials/tut_dll01.shtml if you need to know how to make a dll. 