[TRNSYS-users] Call external file through special cards with C++

xingbin lin lynxingbin at gmail.com
Fri Jun 4 06:30:34 PDT 2010


Hello everyone,

I built a new type in which I need call external file through special
cards in trnsys 16,and I exported it as C++,in this type,I wanted to get the
path of external file by using the access  function getLabel(int,int) which
was defined in TRNSYS.h header file.

But when I runned the simulation,it  prompted "Access  violation at address
###### in module 'dforrt.dll'".The function getLabel(int,int)  defined in
"TRNSYS.h" is that "extern "C" __declspec(dllimport) char* _cdecl
TRNSYSFUNCTIONS_mp_GETLABEL(int , int );#define getLabel
TRNSYSFUNCTIONS_mp_GETLABEL".

I searched this problem in internet,somebody said maybe the reason existed
in the process of calling the dll between  C++ and Fortran.
Please tell me how can I solve this exception and any suggestions.

Thanks.

Xingbin Lin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20100604/89eb9c31/attachment-0005.htm>


More information about the TRNSYS-users mailing list