Compiling a static C library

BlitzMax Forums/BlitzMax Programming/Compiling a static C library

RJJ(Posted 2011) [#1]
Can anyone help? I am trying to use Blitz to test some bespoke C modules. Previously, I use Dev-C to develop the module as a static library (mod.a). However, trying to install Dev-C on Win7 64bit has failed. Does anyone know of a suitable replacement?

That is a IDE for GCC that would complile a library linkable with Blitz on a machine running Win7 64 bit?

Thanks
RJJd


Brucey(Posted 2011) [#2]
How about Code::Blocks with MinGW ?

Or... compile it directly into a BlitzMax module...


Gabriel(Posted 2011) [#3]
If you wrote them yourself, it should work just fine in Visual C++. So long as all your methods are exported with C linkage (I'll have to check that, but it's something like )

extern "C"__cdecl

You should be able to link and run it just fine. There's no name mangling in Pure C, that only happens with C++ linkage, so it shouldn't matter which compiler you use.

EDIT: Ok, my memory was slightly wrong. I've edited the code above. That exports with Pure C linkage and you should have no problems with that.

Last edited 2011


RJJ(Posted 2011) [#4]
I used Code::Blocks with GCC in the end and it's workings fine, so thanks for the heads-up.

RJJ