Submitted by robin_a on Thu, 09/16/2010 - 13:25
I have a large Vissim model with user written DLLs. I'm trying out the CCode add-on to see if I can improve the speed of simulation and eventually deploy the model to other non vissim users. Unfortunately I'm having a problem compiling the model.
The DLL is based on the Tank32 example given in the VSDK folder, and works fine under Vissim. I've followed the instructions in the Ccode help document which suggests updating the VSMDLL32.bat to include the library file, and adding the function declaration to userdll.h in the following form:
__declspec(dllexport) void _stdcall EXPORT READ_INPUT_FILE(double p[],double in [],double out[]);
for my DLL (based on TANK32) I think this should look like:
__declspec(dllexport) void _stdcall FAR PASCAL EXPORT main (double FAR param[],double FAR inSig[],double FAR outSig[])
I've tried variations on this theme removing each and every keyword (especially FAR) from both the definition in the DLL and the header, and I usually get back to the same error when compiling:
errorC2373: 'main' : redefinition; different type modifiers C:\Vissim70\cg\include\userdll.h(2): see declaration of 'main'<br> NMAKE : fatal error U1077: 'cl' : return code '0x2'
Please could you let me know what I'm doing wrong? I have no problem compiling simple Vissim models, And would find the CCode add-on really useful if I could get over this hurdle,
Thanks
Robin Auckland