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

Re: [TRNSYS-users] Linking to the TRNSYS DLL



Diego,

I'm making this change for SRCC.  We run a separate front end program that
runs 1000s of simulations in batch mode using a separate piece of software
that handles many things that support ratings generation.  As such, I need
to be able to use our existing software, which I had running TRNSYS 15, and
just need to be able to have it run TRNSYS 16.  In TRNSYS 15, with a
different compiler, I just used one line item for the DLL import and had no
problems importing, but now I'm running into the external reference error.

Thanks,

Steven Long, P.E.

-----Original Message-----
From: Diego A. Arias [mailto:daarias@wisc.edu] 
Sent: Monday, March 26, 2007 8:52 AM
To: Steven Long
Cc: trnsys-users@engr.wisc.edu
Subject: Re: [TRNSYS-users] Linking to the TRNSYS DLL

Dear Steve,

I have created applications that modify the input file, and then call 
the TRNExe.exe. This alternative allows you to keep all the capabilities 
of TRNSYS.
Please let me know if this alternative works for you, as I can elaborate 
more on how to do that.
Best regards,

Diego

Steven Long wrote:
>
> I'm trying to import a TRNSYS DLL into a non TRNSYS executable. I'm 
> using the following interface in my calling exe:
>
> *interface*
>
> *subroutine* TRNSYS(ICALL,PAROUT,PLOTOUT,LABELS,TITLES,DECKNAME)
>
> *!DEC$ATTRIBUTES DLLIMPORT :: TRNSYS*
>
> *!MS$ATTRIBUTES ALIAS:'TRNSYS' :: TRNSYS*
>
> *!MS$ATTRIBUTES STDCALL :: TRNSYS*
>
> *!MS$ATTRIBUTES REFERENCE :: ICALL*
>
> ! CHARACTER*160 DECKNAME
>
> ! CHARACTER*1 LABELS(2000),TITLES(750)
>
> ! DOUBLE PRECISION PAROUT(1000),PLOTOUT(1000)
>
> *end subroutine* TRNSYS
>
> *end interface*
>
> * *
>
> *I've tried several iterations of this, but keep getting the 
> "unresolved external references link error" I've confirmed that the 
> compiled TRNSYS dll is in the link path. I'm using the Intel V9.XX 
> compiler.*
>
> * *
>
> *Could you clarify what changes I need to make.*
>
> * *
>
> *Thanks,*
>
> Steven Long, P.E.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users@engr.wisc.edu
> https://www.cae.wisc.edu/mailman/listinfo/trnsys-users
>   

-- 
Diego A. Arias
TRNSYS Coordinator
Solar Energy Laboratory
University of Wisconsin - Madison
1500 Engineering Drive
Madison, WI 53706