- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
...
FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0)
ret = SetStdHandle(STD_OUTPUT_HANDLE, hFile)
...
ret=DeleteFile ("temp.txt"C)
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hello,
As far as I know Linux does not have Dynamic Load Libraries (.dll), but instead Shared Objects (.so). Please read the documentation about shared objects. You can remove the DLLEXPORT by adding #ifdef's that are not activated in Linux. In this way the same source code can work everywhere.
I hope this works,
Lars Petter Endresen
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi,
Thank you very much for your reply.
In windows system the fortran code is built to a dynamic load library and called by C++ code. How can I change the code and compile the fortran code to let it be called by C++ in Linux?
Thanks,
Zhanghong Tang
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
!DEC$IF DEFINED(_WIN32)As for the question 2, (redirection of standard output), I would get rid of it entirely and simply replaced all WRITE(*) and PRINT* statements with WRITE(42), having previously OPEN(42, FILE="temp.txt"). If that's not an option for some reason (e.g. you still want standard output in some cases), better ask on Intel Linux Fortran forum about equivalent construct there (possibly some PXF* routne). Ah, I see you already did.
Windows-specific code
!DEC$ELSE
Linux-specific code
!DEC$ENDIF
Jugoslav
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Jugoslav,
Thank you very much. You are always so kind. Now I simply deleted these statements, then compile and link, link error still exist. Could you tell me if any special options need when compile and link?
Thanks,
Zhanghong Tang
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고