- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
...
FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0)
ret = SetStdHandle(STD_OUTPUT_HANDLE, hFile)
...
ret=DeleteFile ("temp.txt"C)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
!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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page