Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error compiling multiple .F files into single DLL

Hi there, I am trying to compile multiple Fortran files into a single DLL and am getting the following message when creating the DLL. The files AVR1OEL.F, AVR1UEL.F and AVR1_AVR.F all compile correctly on their own and I can create three usable DLLs, but I want to have only one DLL which contains all three models. Any ideas what is going wrong here?

     link /INCREMENTAL:NO /NOLOGO /DLL /SUBSYSTEM:WINDOWS /MACHINE:X86 /ERRORREPORT:PROMPT
@"C:\Users\Patrick\.pssenvmgr\linkfilestvxtmu.txt" /OUT:"C:\Users\Patrick\.pssenvmgr\AVR1_v34.5.dll"
/map:"C:\Users\Patrick\.pssenvmgr\AVR1_v34.5.map"

 AVR1_OEL.obj : error LNK2005: _MAIN__ already defined in AVR1_AVR.obj
 AVR1_UEL.obj : error LNK2005: _MAIN__ already defined in AVR1_AVR.obj
 C:\Users\Patrick\.pssenvmgr\AVR1_v34.5.dll : fatal error LNK1169: one or more multiply defined symbols
found

 ERROR during link(1)... Aborted