View previous topic :: View next topic |
Author |
Message |
JMoody
Joined: 26 Aug 2008 Posts: 20 Location: Ohio
|
Posted: Tue Mar 01, 2011 8:34 pm Post subject: Link error when compiling for release |
|
|
I have a Fortran project that is compiled into a dll to be accessed from C#. It compiles fine in debug mode, but I get the error "Internal Linker Error" when compiling it in release.
I have reverted my source to the last time the program compiled for release. With that version, I get the error "Salford Common Language Runtime Linker has encountered a problem and needs to close." every time I compile in Release mode. My application log gives the following error:
Faulting application dbk_link2.exe, version 2.0.3710.37114, stamp 4b898274, faulting module ntdll.dll, version 5.1.2600.6055, stamp 4d00f27d, debug? 0, fault address 0x0001240b.
I really don't know what to do. Any suggestions? |
|
Back to top |
|
|
JMoody
Joined: 26 Aug 2008 Posts: 20 Location: Ohio
|
Posted: Thu Mar 03, 2011 5:26 pm Post subject: |
|
|
We have played with this some more.
The problem seems to be the optimization flag. If I turned that off, the project will compile for RELEASE.
Now, the project is large. I have been moving individual functions and subroutines into their own source files for ease of maintenance. There are over 195 files right now, and I still have code that have multiple routines in them. I did move 1 or 2 functions into their own files recently, but I reverted to an older version that didn't have as many files, and still got the error.
Is there a limit on the number of files the linker can optimize? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Mar 03, 2011 6:02 pm Post subject: |
|
|
No. The compiler does the optimising and there is no limit to the number of files.
You can apply the optimise option to files separately so if there is one where optimise does not work then you can leave it off for that file.
In any case you may find the exe runs fast enough without "optimise" at all. |
|
Back to top |
|
|
JMoody
Joined: 26 Aug 2008 Posts: 20 Location: Ohio
|
Posted: Thu Mar 17, 2011 2:54 pm Post subject: |
|
|
Well, I had the same problem again today. I had split another function out into it's own source file for a total of 197 files in my .NET Fortran project.
Debug linked just fine. However, release blew up with the dbk_link2 error. Here's the Application error information from the Win7 computer:
Faulting application name: dbk_link2.exe, version: 2.0.3955.36791, time stamp: 0x4ccc7f6f
Faulting module name: MSVCR80.dll, version: 8.0.50727.4927, time stamp: 0x4a2752ff
Exception code: 0xc0000005
Fault offset: 0x0001500a
Faulting process id: 0x%9
Faulting application start time: 0x%10
Faulting application path: %11
Faulting module path: %12
Report Id: %13
So, I moved the function back into the original source file, and deleted the new function. I now have 196 files. Release will now link. |
|
Back to top |
|
|
|