Hello everybody,
I work usually with Fortran. We have a Fortran program that we want upgrade using a opensource program which is write in c. We want to convert it into dll that we can load that in our fortran application.
The main function of the c program is
The c program is a command line tool. To computes the program, the usage is:Code:int main( int argc, char **argv ){}
ProgramName <inputfile> <outputfile>
I have look a lot of manuals in internet about generate a dll in c/c++. I am not sure what I am doing is right or wrong.
I define a macro that declares the main function to be exported when building our dll-config, and not to be exported, when building the exe. like:
Is that correct?Code:#ifdef DLLCONFIG #define VIEW3D_API __declspec(dllexports) #else #define VIEW3D_API #endif VIEW3D_API int main(int argc, char **argv){ return; }
Thanks,
Laura