[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TRNSYS-users] new component in C++



Dear Trnsys-users,

I'm having some troubles compiling a new component that i have to use for my master thesis.

Here's what i've done:

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?

Leaving this line open, i save the component and export it as C++.

Then i get the message that trnsys will create a standard c++ source file
and will try to compile it. The program doesn't find my compiler (devc++) so
i have to compile it manually.

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@16'"

So basically i only get linker errors

At this point all the files are in the myprojects folder of the trnsysprogram.
I also copied the "TRNSYS.h" file into this folder and the "#include trnsys.h" line is in my c++ source file.

How do i make my compiler find these trnsysfunctions?
Is there something i have overlooked in order to be able to compile my c++ file?
(should it be in a specific folder in the trnsysprogram?)


Once i get my c++ file compiled and have the .dll, i should be fine.


Thank you very much for your help!

Kind regards,
Wouter Lumen