.lib

BlitzMax Forums/BlitzMax Programming/.lib

Alienforce(Posted 2006) [#1]
Is it possible to use .lib files from VC2003 with bmax ??
Because i have written a FPS / 3PS engine in C++ and would
like to wrappit for use with bmax.


ozak(Posted 2006) [#2]
You could do it as a dll file, but lib files won't work as it uses MinGW which uses unix style .a files.
Dunno if it can be converted from .lib to .a though? Might be worth a goole :)


Dreamora(Posted 2006) [#3]
If you've written the engine in C++, it would be easier to create a C wrapperlayer in between and import that directly. (you can't use the objects directly within BM anyway)


N(Posted 2006) [#4]
Some .libs will work and some .libs won't. I'd stick to .libs built with VC6 and consider anything above incompatible, as they're the only ones I've had any luck with.


Filax(Posted 2006) [#5]
Any chance to see an example ?


seyhajin(Posted 2006) [#6]
try with 'reimp' utils tools for MinGW at : http://jrfonseca.planetaclix.pt/projects/gnu-win32/software/reimp/index.html

reimp convert your .lib (MSVC) to .a (GCC).


JoshK(Posted 2007) [#7]
I downloaded the MinGW utilities, and I can't find reimp.exe anywhere.


Gabriel(Posted 2007) [#8]
http://www.mingw.org/MinGWiki/index.php/mingw-utils


JoshK(Posted 2007) [#9]
Thanks.

I was able to create an .a file from Newton.lib, import it, and extern a Newton function, but it still wanted the dll, so there's not much point in doing it that way. Still interesting, though.


Gabriel(Posted 2007) [#10]
Yeah, in order to ditch the DLL, you would need to statically link Newton. As far as I can see from the SDK, they only provide the static lib in Visual Studio format. You might be able to convert that ( since Newton doesn't have any kind of class hierarchy in it's naming conventions ) but I'm not sure how. I do recall it being suggested to me that converting a static lib from .lib to .a might be possible, I just can't remember the tool they suggested using.


Pantheon(Posted 2007) [#11]
I recently found this link

http://nexe.gamedev.net/directKnowledge/default.asp?p=DirectX%20Development%20Using%20DevCpp

it shows you how to convert a .Lib file to .a. Its for DevC++ but then that used minGW anyhoo.

I havent tried it however.