- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
I have a quick question on the following sample file:
ExceptionHandlingGETEPTR
When compiling the solution, I've got the following error:
fatal error LNK 1104" cannot open file 'IFWIN.LIB'
Please advise how to add this reference tothe C project of the solution (though it already has the dependency to the geteptr_lib). TIA
-George
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to do this in general when building C applications that call Fortran code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running Visual Studio 2005 and IVF 9.1 and have a problem with running a Fortran dll from Visual Basic.
I have taken your example, which runs fine. However, if I add the following code to the fortran I get a problem:
SUBROUTINE dll_rout1 ()
IMPLICIT NONE
!DEC$ ATTRIBUTES DLLEXPORT, STDCALL :: dll_rout1
!DEC$ ATTRIBUTES ALIAS:'dll_rout1' :: dll_rout1
character(len=4) :: dd
dd="aaa"
RETURN
END
Note that I leave your code exactly intact - my code is an additional routine that is never executed. When I press the "Do it!" button in your code I get the error:
"BadImageFormatException was unhandled"
"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
What is very odd is that if I change "aaa" to "aaaa" in the above code then everything works fine! It seems to be someting to do with the presence of a string that is not the "right" length, but Fortran of course should cope with that. Any suggestions? ... I'd be very interested to know if your system reproduces this fault!
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that the USELIB version worked fine. Note that just building USEDLL alone also has the same result as before.
Just wondering how serious this is if I want to use USEDLL as a template for calling a FORTRAN DLL I've created?
Regards, Warwick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem was that the Fortran debug DLL libraries were linked to a non-redistributable MSVC 6 DLL. They aren't anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Despite having an old compiler I have managed to get something working involving the Mixed-Language examples. Your example uses a mainline C++ program to call the FORTRAN DLL. Oracle seems to require me to call a FORTRAN routine from a C (not C++) DLL. I have tried to use the Microsoft Visual Studio wizard to create a C DLL that calls FSUB but it won't compile with the call to printf:
"error C3861: 'printf': identifier not found, even with argument-dependent lookup". Interestingly I had a similar problem previously but I got around it substituting " for and > (I think) in the #include "*.h" commands. My code is attached along with the complete error message.
I probably should be asking ORACLE for help but others may be interested in knowing how to call a FORTRAN subroutine - or DLL - from a C DLL. I'm using Visual C++ associated with Visual Studio 2003 .NET.
I got rid of printf and although it will compile, it won't create a .dll file:
"Linking...
Creating library Debug/C_DLL_CALLDLL.lib and object Debug/C_DLL_CALLDLL.exp
C_DLL_CALLDLL.obj : error LNK2019: unresolved external symbol __imp__FSUB referenced in function _CALL_FSUB
Debug/C_DLL_CALLDLL.dll : fatal error LNK1120: 1 unresolved externals"
even though I have put FDLL.lib and FDLL.dll files into the C_DLL_CALLDLL debug directory.
Regards, Warwick.
- 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
i tried to compile the c_calls_fortran project. i want to use fortran dll in c++ project.
the FDLL project compiles without any problem and makes .lib and .dll files. however USEDLL project fails with these warning and errors:
Warning 1 warning C4996: 'strcpy' was declared deprecated d:c_calls_fortrancmain.cpp 56
Error 2 error LNK2019: unresolved external symbol __imp__FSUB referenced in function _main CMAIN.obj
Error 3 fatal error LNK1120: 1 unresolved externals d:C_calls_FortranUSEDLLDebugUSEDLL.exe 1
i use Intel Visual Fortran 9.1 integrated with Visual Studio 2005.
i tried to add the .lib file to USEDLL project (as i do it for using dll's in fortran) but it did not solve the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The warning is a new thing in Visual C++ 8 (VS2005) - you can ignore it unless you want to research what new routine is to replace strcpy.
I am not sure what you did for the library issue, as adding the library works for me. Try adding it to the project itself rasther than to "source files". An alternative is to name the path to the library in the Linker Input property for Additional Dependencies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I try to download the samples by clicking on the zipped attachement, I get a message
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
An invalid character was found in text content. Error processing resource 'http://softwarecommunity.intel.com/isn/Community...
- 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
I am able to download the zip file using Firefox at work and at home but am not able to download it using Internet Explorer 6.0.2900 at work, running Windows XP Pro. My problem is solved, anyway. Thanks.
Vivek Rao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to build a mixed language (c++ & FORTRAN) code that I had working about a year ago with a previous version of Intel's FORTRAN compiler (v8 I think). ( I am now using Visual Studio 2003 and Intel's FORTRAN 10.1.011). I build a FORTRAN dll and call it from c++. I can get the code to build but I get a run-time error (pop-up window) that says "The procedure entry point __cpowq could not be located in the dynamic link library libmmd.dll". So I tried to run your sample C_calls_Fortran. Visual studio had to converted the solution and projects to V10. All projects compiled fine but when I run the USEDLL code I get the same error as I get with my code. Is something wrong with my install? Did something in the projects not get converted correctly.
I looked in the "libmmd.lib" file and I find what looks like a reference to "___cpowq". The case matches but it looks like it has an extra leading underscore. Any help would be greatly appreciated.
Thanks
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Never mind, I found the problem. It so happens that Roxio (the CD burning code) had in its distribution a library by the same name and its directory appeared earlier in the search path than the FORTRAN compiler's library. I still don't get the triple undersore thing but since the code is working I guess I am not going to worry about it. (I also noticed some versions of routines in the .lib file that had a "_imp_" prepended to the name. I guess these are some kind of naming conventions.)
Bottom line is that is was a problem in finding the right library and it is now fixed.
Thanks anyway.
Dan
- 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
I tried to run the FXPLORER sample. Compilation went well, but when I started the program the message can't find IFDLGnnn.DLL appeared. I searched for such files and found one, IFDLG100.DLL, located in the compiler's bin directory. I use version 10.1.011 of the compiler. Any idea of how to solve this?
SAE
- 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
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page