09-30-2006 04:25 PM
10-02-2006 11:10 AM
10-02-2006 01:51 PM
You create a DLL project and use the prefered method of your compiler system to define which functions the DLL should export. How this is done is very much dependant on your compiler and IDE and you should refer to its online documentation to understand how that is done.
@Dror wrote:I know how to write a simple C code for use in a DLL : I put it between the brackets after I use "creat .c file" in the "Call Library Function Node".I did it and the DLL did fine. But what do I do when I want to put inside a big program that includes 5 source files (.c) and one header file (.h)?
10-18-2006 05:29 AM
#include "extcode.h"
long avg_num(float a[], long size, float *avg);
long avg_num(float a[], long size, float *avg)
{
/* Insert Code Here */
}
Now I am supposed to replace the /* Insert Code Here */ spacer with the function code, placing the code within the pair of curly braces.
But what if my code is a very long program consisting on several files and a header. Can I simply use include?
10-18-2006 05:31 AM
10-18-2006 01:52 PM
You should really study a text book about developing in C. Every IDE for just about every modern C compiler has a concept called project. In there you add all de C source files that are needed to create your DLL, EXE or whatever. Almost every DLL or EXE nowadays consists of numerous C source files that implement specifc groups of functions and each of those can simple call functions that are implemented in one of the other C source files or even in a precompiled object or library file. The project manager compiles all C source files into object modules and then the linker adds them all together to the final executable image.
@Dror wrote:Thank you for your answer,I would like to focus on DLL because I already know how to use it. The question is when I get this situation:* Call Library Source File */#include "extcode.h"
long avg_num(float a[], long size, float *avg);
long avg_num(float a[], long size, float *avg)
{
/* Insert Code Here */
}
Now I am supposed to replace the /* Insert Code Here */ spacer with the function code, placing the code within the pair of curly braces.
But what if my code is a very long program consisting on several files and a header. Can I simply use include?