Hello,
I have dealt with these errors before and in some cases the internal linker error is just caused by incorrect type casting or something, but in this case I cannot figure it out at all.
Here is what the build log says:
Command line for link: dbk_link4.exe /VS7 /NO_BANNER /MULTI_THREADED /INTERFACE_ONLY /CC:MEDLIEngine /VER:2.0.0.0 /REF:'..\Common\obj\Debug\Common.dll';'..\Domain\obj\Debug\Domain.dll';'C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll';'C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Data.dll';'C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.XML.dll' 'Debug\NET\Project.dll' @'C:\Users\user\Documents\project\PROJECT\Project\link.lst'
Linker output: LINK : error : Internal Linker Error
There is a lot of code involved but I will try to give you an idea of what lines are causing it:
!Pathogen Output !@@ THESE 3 LINES BELOW CAUSE INTERNAL LINKER ERROR
IF (AERO1 .or. AERO2) then
!Output%SustainabilityDiagnosticData%PathogenRunMessages%PathogenOutput%TotalNumberExposures = ingest_air_freqtot !NoUnits
ELSEIF (DIRECTs) then
!Output%SustainabilityDiagnosticData%PathogenRunMessages%PathogenOutput%TotalNumberExposures = ingest_liq_freqtot !NoUnits
ELSE
!Output%SustainabilityDiagnosticData%PathogenRunMessages%PathogenOutput%TotalNumberExposures = ingest_liq_freqtot !NoUnits
ENDIF
However the following code which accessing the same part of the model does not cause the linker error:
do i = 1, nbugsi
Output%SustainabilityDiagnosticData%PathogenRunMessages%PathogenOutput%PathogenInfectionRiskAllEventsDetailArray(i-1)%PathogenSpecies = bugsppi(i) !NoUnits
IF (AERO1 .or. AERO2) then
Output%SustainabilityDiagnosticData%PathogenRunMessages%PathogenOutput%PathogenInfectionRiskAllEventsDetailArray(i-1)%InfectionRiskAllEvents = pry(air,0,i) !No. extra infections/10000 persons
ELSEIF (DIRECTs) then
Output%SustainabilityDiagnosticData%PathogenRunMessages%PathogenOutput%PathogenInfectionRiskAllEventsDetailArray(i-1)%InfectionRiskAllEvents = pry(liq,0,i)!No. extra infections/10000 persons
ELSE
Output%SustainabilityDiagnosticData%PathogenRunMessages%PathogenOutput%PathogenInfectionRiskAllEventsDetailArray(i-1)%InfectionRiskAllEvents = pry(liq,0,i) !No. extra infections/10000 persons
ENDIF
enddo
I have posted here about this kind of bug before but never really figured out how to debug what is going on, usually I simply just have to find the line that is causing it and correct some typing or something, but in this case I cannot ascertain anything that would be causing it.
Any help resolving this would be very appreciated, Thanks, Alex.