LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Turning a C program into a dll with Bloodshed

I am having difficulties trying to, using the Bloodshed compiler to turn a simple C program into a dynamic link library. Is there, if Bloodshed is not easy to do so, something FREE that will easily create .dll's? I seem to be stuck at the part of somehow threading the Code and telling the compiler to turn it into a .dll. I am ok to step 5, chapter 2, (2-11), on Calling External Code in the LabVIEW Bookshelf under help. I am trying to use a Call Library Function. Is there a simple way of just wrapping these C codes and just pushing save as .dll?


Thanks,

Brian
0 Kudos
Message 1 of 4
(2,698 Views)
Hi Brian,

Bloodshed is not listed as one of the supported compilers for compiling shared libraries. For a Windows platform, we have the Microsoft Visual C++ IDE listed as a compiler that NI uses to test out compatibility. However, if you are looking for a free compiler, I would suggest downloading the GNU compiler, GCC http://gcc.gnu.org.

Kileen
Message 2 of 4
(2,680 Views)
So as you say gcc is supported, bloodshed is too because it's just an IDE, which uses gcc as compiler. So it's "just" a question of correct parameters for gcc and I think you can pass any options to gcc you want from bloodshed.

So long,
Carsten

PS: Sorry, but I don't know how to create a Windows dll using gcc, but I think there should be documentation available somewhere. The standard configuration of bloodshed comes with the mingw gcc, so try starting at www.mingw.org.
0 Kudos
Message 3 of 4
(2,660 Views)
Well, it is OT, but anyway...

In my version of dev-C++ (4.9.8.7), I can create a new project, and select the "DLL" template from the Basic tab...

Just create a new dll project, and copy paste the code from the existing code.

Regards,

Wiebe.

"CalTech" <x@no.email> wrote in message news:176244@exchange.ni.com...
I am having difficulties trying to, using the Bloodshed compiler to turn a simple C program into a dynamic link library. Is there, if Bloodshed is not easy to do so, something FREE that will easily create ..dll's? I seem to be stuck at the part of somehow threading the Code and telling the compiler to turn it into a .dll. I am ok to step 5, chapter 2, (2-11), on Calling External Code in the LabVIEW Bookshelf under help. I am trying to use a Call Library Function. Is there a simple way of just wrapping these C codes and just pushing save as ..dll?<br><br><br>Thanks,<br><br>Brian
0 Kudos
Message 4 of 4
(2,617 Views)