I am using reactivision library which is written in C. I am trying to make it a dll file so that my c# program can call the functions. I browse a lot of threads and none of them is about converting so many files to one dll. In the c source file, some type definition looks like:
typedef struct PartialSegmentTopology{
struct Region black_leaf_regions_head;
struct Region black_leaf_container_regions_head;
struct Region root_regions_head;
}PartialSegmentTopology;
I don't know where to insert '__declspec(dllexport)'.
Another issue is if I also need to insert it to the implementation(i.e. .c file)? My guess is I only need to do this in the header file. Please correct me if I am wrong.
Any help is appreciated.
Update: I followed this link to generate my dll file. But when I call the function in my c# code, it thrown DllNotFoundException though I put this dll file in correct folder.(I tried both bin/Debug and the project folder.)