- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I am porting a compaq fortran project (version 6.x) over to the intel
fortran compiler (version 8.0). However, crash always happens at the
internal write statement under the intel fortran compiler.
=========
project brief:
=========
The soultion comprises two parts, one is the c++ project, which in charge of
the user interface, the other project is a Fortran Dll project. The Fortran
Dll is invoked by the C++ project. the problem I meet here is every simple,
the C++ project is just a framework of the dialog based mfc win32
application. In the code response to the click OK button, it will invoke the
fortran dll. The Fortran dll is built as the name of TestDll.dll. The core
part of the C++ and Fortran code are shown as follows:
=========
C++ code
=========
...
typedef unsigned int (__stdcall *_FPTR_START_APP) ( void * );
...
if (nResponse == IDOK) ////code corresponding to the click OK
button
{
CString fileName = "abc";
m_hSimDLL = LoadLibrary((LPCTSTR)"TestDll");
FARPROC fPtrStartApp = ::GetProcAddress( m_hSimDLL, "StartApp" );
void* pvSecurity = NULL;
unsigned int* puiThrdAddr = NULL;
m_hThread = (HANDLE) _beginthreadex( pvSecurity, 0,
(_FPTR_START_APP)fPtrStartApp, (void *)(LPCTSTR)fileName.GetBuffer(0), 0,
puiThrdAddr );
...//idle or do something here so that the thread of the fortran Dll will
run and can be debugged.
}
=========
Fortran code
=========
Corresponding Fortran Dll is made of by the following code:
! ---------------------------------------------------------------------
Subroutine StartApp(iAddressStrBuf)
!DEC$ ATTRIBUTES DLLEXPORT::StartApp
!DEC$ ATTRIBUTES ALIAS: 'StartApp'::STARTAPP
!DEC$ ATTRIBUTES VALUE::iAddressStrBuf
integer iAddressStrBuf
integer i
character*32 strTest
i=555
write(strTest,'(i10.10)') i
return
end subroutine StartApp
!----------end of the fortran dll project ----------------------------------
=========
Symnpton
=========
Whenever the internal write statement is invoked, the program will crash and
report the error of access violation occurred.
If there is anyone knows the issue, could you please give me a hand.
=========
Attached
=========
It appears that I can not send the whole project sample files in zip format,
I will send to those who responsed to this email either in person or to the
newsgroup if needed.
Best Regards,
David
Link kopiert
- « Vorherige
-
- 1
- 2
- Nächste »
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Steve,
The FORTRAN compiler is 9.1.028. Two other programmers in our company were having a similar problem with different applications. The other 2 were able to wrap the FORTRAN WRITE with a "C" call. For all of us it used to work in WIndows 2000. But it failed when we installed Windows XP. In some case no code change but only a re-build on XP caused the crash.
Thanks,
Rachel
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
We'd be glad to help if you can provide Intel Premier Support with a complete example that demonstrates the problem.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Steve,
The address that it is crashing is: 0x0C1288A0.
Thanks,
Rachel
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Steve,
My problem was that I was using "debug Mutlithred dll" instead of "Multithres dll". You have mention this problem in 108663of this subject but I have missed it.
I had one of my co-worker read all your responses to this problems and he noticed it.
Thanks again for all your great support.
Rachel
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite
- « Vorherige
-
- 1
- 2
- Nächste »