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

Re: [TRNSYS-users] Error compiling new component



Hi,

 

at first this was working, when I created my own components. I downloaded the compiler in the link you send me and I was able to compile new components. But I also have to edit older ones from former. This message is appering then:

 

>g95  -mrtd -o  c:\programme\Trnsys16_1\Userlib\ReleaseDlls\Type229.dll trnsysconstants.o trnsysfunctions.o typeck.o messages.o Storage.o Diffeq.o trnsysdata.o pq.o linkck.o Psych.o Type229.o

c:/programme/g95/bin/../lib/gcc-lib/i686-pc-mingw32/4.0.4//libf95.a(main.o):(.text+0x32): undefined reference to `_MAIN_'

>Exit code: 1

 

Maybe someone can help.

 

Thanks,

Marius

 


Von: keilholz, werner [mailto:werner.keilholz@cstb.fr]
Gesendet: Dienstag, 27. April 2010 15:05
An: Marius Müller; trnsys-users@cae.wisc.edu
Betreff: RE: [TRNSYS-users] Error compiling new component

 

Hi Marius,

 

Here’s what worked for me:

 

set TRNSYS_TYPE=242

 

G95 -fcase-upper -fno-underscoring -M TrnsysData.for

G95 -fcase-upper -fno-underscoring -M TrnsysFunctions.f90

G95 -fcase-upper -fno-underscoring -M TrnsysConstants.f90

 

G95 -fcase-upper -fno-underscoring -c TrnsysFunctions.f90

G95 -fcase-upper -fno-underscoring -c TrnsysData.for

G95 -fcase-upper -fno-underscoring -c TrnsysConstants.f90

 

G95 -fcase-upper -fno-underscoring -shared -mrtd -o Type%TRNSYS_TYPE%.dll Type%TRNSYS_TYPE%.for TrnsysConstants.o TrnsysFunctions.o TrnsysData.o -L. TRNDll.dll

 

(Details : https://www-old.cae.wisc.edu/pipermail/trnsys-users/2009/004878.html ).

 

HtH,

 

Werner

 

De : Marius Müller [mailto:m.mueller@solitem.de]
Envoyé : mardi 27 avril 2010 14:52
À : trnsys-users@cae.wisc.edu
Objet : [TRNSYS-users] Error compiling new component

 

Hi at all,

 

I am using trnsys with fortran g95 compiler, when I create a new objekt and also when I edit an existing one, compiling is no prolem. bbut when I want to build the file, the error

 

>g95 -shared -mrtd -o  c:\programme\Trnsys16_1\Userlib\ReleaseDlls\Type191coolingDemand.dll trnsysconstants.o trnsysfunctions.o typeck.o messages.o Storage.o Diffeq.o trnsysdata.o pq.o linkck.o Psych.o Type191coolingDemand.o
ld: -shared not supported
>Exit code: 1

 

appears.

 

when I delete the "-shared" from the fortran properties the following error appears:

 

>g95  -mrtd -o  c:\programme\Trnsys16_1\Userlib\ReleaseDlls\Type191coolingDemand.dll trnsysconstants.o trnsysfunctions.o typeck.o messages.o Storage.o Diffeq.o trnsysdata.o pq.o linkck.o Psych.o Type191coolingDemand.o
c:/programme/g95/bin/../lib/gcc-lib/i686-pc-mingw32/4.0.4/\libf95.a(main.o)(.text+0x32): undefined reference to `MAIN_'
>Exit code: 1

 

 

Maybe someone has some idea what the prolem is,

 

thanks,

Marius Müller