[TRNSYS-users] new component in C++

Wouter Lumen wouter.lumen at ugent.be
Mon Apr 7 16:21:42 PDT 2008


Dear Werner,

Thank you for your reply.

It probably has something to do with the headerfile indeed.
The statement #include "trnsys.h" is in the sourcefile!
So far i have used 2 trnsys.h files: one I copied from the trnsysfolder and
one i got from somebody else who used it to compile his component.

I'm gonna try to get somebody with more C++ experience have a look at it.

Kind Regards,
Wouter

Citeren "keilholz, werner" <werner.keilholz at cstb.fr>:

> Dear Wouter,
>
> This is a compile-time error. It means that functions like   
> 'getStorageVars' are not found by the compiler when it tries to   
> compile your program.
>
> It probably means that the statement
> #include "Trnsys.h"
> is missing, or that a wrong version of the file Trnsys.h is used.
>
> Hope this helps,
>
> Werner
>
> -----Message d'origine-----
> De : Wouter Lumen [mailto:wouter.lumen at ugent.be]
> Envoyé : samedi 5 avril 2008 01:22
> À : TechSupport at tess-inc.com
> Cc : trnsys-users at engr.wisc.edu
> Objet : Re: [TRNSYS-users] new component in C++
>
> 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
>>
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at engr.wisc.edu
> https://www.cae.wisc.edu/mailman/listinfo/trnsys-users
>
>
>
>
>
> ************************************************************************************
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals &   
> computer viruses.
> ************************************************************************************
>
>
>
>
>
>
>
>
> ************************************************************************************
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals &   
> computer viruses.
> ************************************************************************************
>
>





More information about the TRNSYS-users mailing list