‎09-16-2010 05:05 PM
Back Again!
I have run through Using External Code Manual in order to build a shared library or DLL from C Code.
3 steps are described to build the DLL with the third one being "Build a Library Project in an external IDE" which i haven't got.
And I know that the Application Builder can be used to build a DLL but from VIs and not C code.
So, Are there any solutions to re-use my C code in LV without any compiler?
Christophe
‎09-16-2010 05:19 PM
‎09-16-2010 05:28 PM
Haven't tried it myself, but there's also gcc through MinGW. Although gcc is usually used on the Linux side.
‎09-17-2010 02:12 AM
@Darin.K wrote:
I understand not wanting to drop the $$ (or is it $$$) for VS.
What do you mean?
Thanks for your 2 suggestions...I will investigate them! I wanted to be sure not to miss something about DLLs and their creation.
Christophe
‎09-17-2010 03:42 AM
In most cases(but not all) the best solution is to use native Labview. What kind function do you want to implement in C++
‎09-17-2010 08:06 AM
My goal is to re-use a C++ code that I made a few years ago resampling .jpeg images given an algorithm (IMAQ Resample doesn't exactly suit to my needs). So I was looking for solutions not to rewrite evrything under the LV environment. And I am not familiar with DLLs with LV...
I downloaded VS 2010 express version and called my first DLL in LabVIEW that makes the average of numbers (http://zone.ni.com/devzone/cda/tut/p/id/4877). I now need to make the same thing but with my C++ code!
@COq Rouge wrote:
In most cases(but not all) the best solution is to use native Labview. What kind function do you want to implement in C++
Native labview : what's this?
kind of function : void blablabla
Are you asking for the prototype?
‎09-17-2010 08:22 AM
@superfunk wrote:
Native labview : what's this?
kind of function : void blablabla
Are you asking for the prototype?
No but is is well know fact that then C programmers are retrained to Labview. Their programming style is often far from good Labview practice. And many times problems are solved in a strange manner. A good example is abusing globals and locals as they think they are just pointers. Also cheating using DLLs for problems that easily could be done in Labview is not uncommon.
‎09-17-2010 10:33 AM - edited ‎09-17-2010 10:34 AM
@COq Rouge wrote:Also cheating using DLLs for problems that easily could be done in Labview is not uncommon.
A proper native C++ function should execute significantly faster than an equivalent function written using the LabVIEW realtime engine. Though, we're probably talking about entirely different levels of code as I do this with image processing and I may just not be very good at writing optimized LabVIEW code.
‎09-17-2010 11:12 AM
@hobbesmaster wrote:
A proper native C++ function should execute significantly faster than an equivalent function written using the LabVIEW realtime engine. Though, we're probably talking about entirely different levels of code as I do this with image processing and I may just not be very good at writing optimized LabVIEW code.
Of course. I am talking about problems that easily can be transferred to Labview code. Labview as a software development tool. Has its pro and cons. Labview is a good approach to solve some problems, and not so good in others.
What I was referring to was more like problem solving on this level. They have not used a DLL but I think you will see my point.
‎09-17-2010 01:36 PM
I use Code::Blocks for writing C code. I've used it to write dll's that I call with labview so I know that works. I'd recommend getting the one with mingw to make things easier.