[TRNSYS-users] new component linking problem

keilholz, werner werner.keilholz at cstb.fr
Tue Oct 12 03:07:43 PDT 2010


Hi Marion, 

 

If you created the C++ compile project with Simulation Studio, it added a reference to TRNDll.lib (under Prefernces/Linker/Input/Additional Dependencies).

Your compiler must be able to locate that file -> in VS, go to Tools/Option, select "Projects/VC++ Directories", choose category "Library files" and add the directory containing it (usually \Trnsys17\Exe\) - works for all subsequent projects. 

 

Or, go to the solution explorer, select your solution, right-click, properties, Linker, General, additional Library Directories and check the path is OK it there - works for one project. 

 

Hope this is of use,

 

Werner

 

De : Kerl, Marion (SCR US EXT) [mailto:marion.kerl.ext at siemens.com] 
Envoyé : vendredi 8 octobre 2010 23:04
À : trnsys-users at cae.wisc.edu
Objet : [TRNSYS-users] new component linking problem

 

Hey everyone,

I want to create my own new component. I followed the manual and create a new component  in the TRNSYS Studio. Following that, I exported the components via the "Export to C++". 

Then I created a project in Visual Studio and added the exported cpp-file and the TRNSYS.h to my project.

When I want to make a build of my project, I get these error messages:

1>Link:

1>     Creating library C:\TRNSYS16_1\Studio\Proformas\My components\compTYP201\Debug\compTYP201.lib and object C:\TRNSYS16_1\Studio\Proformas\My components\compTYP201\Debug\compTYP201.exp

1>Type201.obj : error LNK2019: unresolved external symbol "int __cdecl sendclientmessage(int const *,int const *)" (?sendclientmessage@@YAHPBH0 at Z) referenced in function "int __cdecl sendclienterror(int const *,int const *)" (?sendclienterror@@YAHPBH0 at Z)

1>Type201.obj : error LNK2019: unresolved external symbol __imp__TRNSYSFUNCTIONS_mp_GETSIMULATIONTIMESTEP referenced in function _TYPE201

1>Type201.obj : error LNK2019: unresolved external symbol __imp__TRNSYSFUNCTIONS_mp_GETSIMULATIONSTARTTIME referenced in function _TYPE201

1>Type201.obj : error LNK2019: unresolved external symbol __imp__TYPECK referenced in function _TYPE201

1>C:\TRNSYS16_1\Studio\Proformas\My components\compTYP201\Debug\compTYP201.dll : fatal error LNK1120: 4 unresolved externals

1>

1>Build FAILED.

1>

What's wrong? Are there any files in my project missing?

Thank you in advance.

Regards,

Marion

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20101012/06b60334/attachment-0005.htm>


More information about the TRNSYS-users mailing list