Import Visual Studio static lib

BlitzMax Forums/BlitzMax Programming/Import Visual Studio static lib

JoshK(Posted 2011) [#1]
If I build a DLL in Visual Studio and import the created .lib file in BlitzMax, it works just fine, but it requires a DLL. I would like to build a static lib in Visual Studio and import the .lib file, using only the C functions I expose in the DLL. Is this possible? The point is to get rid of the need for the DLL.


Gabriel(Posted 2011) [#2]
I would have thought it would work - given that you're already avoiding the C++ name mangling issues by exporting all your functions as _CDECL "C" functions. But you're asking the question, which would suggest you've tried it and had no luck. Did you get an error message, crash or what?


GW(Posted 2011) [#3]
maybe this? http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/


Azathoth(Posted 2011) [#4]
In the projects properties you should be able to change the configuration type to static library.