[TRNSYS-users] new component in C++

Wouter Lumen wouter.lumen at ugent.be
Fri Apr 4 16:21:38 PDT 2008


David,

Thank you for your answer.


The trnsysfunctions that the compiler doesn't find are in the headerfile.
Even the storage functions that weren't in it originally were added.

I my earlier mail i only gave the types of errors i was getting.
Actually, everytime a trnsysfunction is called upon in the cpp-file I get an
error:
Here's all of them:

1>.\ttestcomp.cpp(155) : error C3861: 'getStorageVars': identifier not found
1>.\ttestcomp.cpp(157) : error C3861: 'setStorageVars': identifier not found
1>.\ttestcomp.cpp(180) : error C3861: 'TYPECK': identifier not found
1>.\ttestcomp.cpp(184) : error C3861: 'setStorageSize': identifier not found
1>.\ttestcomp.cpp(193) : error C3861: 'getSimulationStartTime':  
identifier not found
1>.\ttestcomp.cpp(194) : error C3861: 'getSimulationTimeStep':  
identifier not found
1>.\ttestcomp.cpp(211) : error C3861: 'setStorageVars': identifier not found
1>.\ttestcomp.cpp(227) : error C3861: 'getStorageVars': identifier not found
1>.\ttestcomp.cpp(267) : error C3861: 'setStorageVars': identifier not found

These are all the same type of errors. (this time the file was  
compiled with MSVisualC++2005.)

I have tried 3 different compilers and all of them give these errors.

Could this have to do something with compiler settings?


Thank you.

Kind Regards,
Wouter Lumen


Citeren Technical Support <TechSupport at tess-inc.com>:

> Wouter,
>
>> Create new component in the simulation studio.
>> Already here there is something that i'm uncertain about in the proforma:
>> Under the tab "files": what do i have fill in for "compiling command"?
>> Do i have to put a path there to my c++ compiler?
>
> no, you don't have to put anything there. That field is there if you want
> to be able to execute a compile/link command from within the Studio. If
> you are comfortable using your compiler interface, there is no need for
> the Studio link.
>
>> Then, when i have written my component and i try to compile i get the
>> following  type of errors:
>>
>> "[linker error] undefined reference to '_imp_TYPECK'"
>>
>> "[linker error] undefined reference to
>> '_imp_TRNSYSFUNCTIONS_mp_GETSIMULATIONSTARTIME'"
>>
>> "[linker error] undefined reference to 'WinMain at 16'"
>
> Please check the trnsys.h file (you can open it with a text editor) and
> make sure that both the function GetSimulationStartTime and the subroutine
> TYPECK are exported. With some of the early TRNSYS 16 releases, the
> trnsys.h file was incomplete and did not have all of the subroutines and
> functions exported.
>
> Kind regards,
>  David
>
>
> Technical Support Team
> Thermal Energy System Specialists, LLC
> 2916 Marketplace Dr, Suite 104
> Madison, WI 53719
> techsupport at tess-inc.com
>





More information about the TRNSYS-users mailing list