- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been using COM in a Fortran application to read and write data to Excel files for a couple of years now. The COM routines that I am using were originally generated using the Module Wizard in VS2008 and Intel Visual fortran 9. I am currently using VS2010 with Intel Visual Fortran XE 2011 on a 64 bit operating system, and am considering upgrading my application to x64. Unfortunately it appears that the COM routines are not recognised by the 64 bit compiler. Is there a simple way that I can address this issue, or is it being fixed at present? (I have read the thread followingthomas_boehme's related query in mid 2010).
Many thanks,
Justin.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is undoubtedly because you have not declared the variables RANGE and WORKSHEET properly, but it's an understandable error. These items are handles to COM objects and need to be the size of an address on the platform. If you simply declared them as INTEGER or INTEGER*4, you'd get this error.
Note that the problem is NOT that the rputines "aren't recognized" - they are. If they weren't recognized you'd get very different errors. In this case, the compiler is telling you that the datatypes of some arguments don't match the declared routine.
Since you have USEd KERNEL32, declare these variables to be:
INTEGER(HANDLE)
and that should do it for boh 32-bit and 64-bit.
Note that the problem is NOT that the rputines "aren't recognized" - they are. If they weren't recognized you'd get very different errors. In this case, the compiler is telling you that the datatypes of some arguments don't match the declared routine.
Since you have USEd KERNEL32, declare these variables to be:
INTEGER(HANDLE)
and that should do it for boh 32-bit and 64-bit.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you show us an example of how the COM routines are "not recognized"? If you'll look at the Excel sample provided with the product, you'll see that the same generated EXCEL module is used for both 32-bit and 64-bit targets. I am not aware of a problem in this area.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't looked at the examples provided with the product - are you referring to the "Autodice" routine?
I am referencing the following (additional) library directory:
"C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\ia32"
I am referencing the following modules:
USE IFCOM
USE IFCOMTY
USE IFAUTO
USE KERNEL32
I am using commands such as:
worksheet = $Workbook_GetActiveSheet(workbook, status)
outSheet_temp = $Application_GetName(worksheet, status)
status = AUTOSETPROPERTY (range, "VALUE", xArr(jj,:), VT_R8)
and obtaining errors such as:
Warning 54 warning #6075: The data type of the actual argument does not match the definition. [RANGE] C:\NIESR\Prog_lab\nibax\DRAFT MODELS\30 - 23 Jun 2011\FORTRAN\6_analyses.F90 2824
Error 55 error #6284: There is no matching specific function for this generic function reference. [AUTOSETPROPERTY] C:\NIESR\Prog_lab\nibax\DRAFT MODELS\30 - 23 Jun 2011\FORTRAN\6_analyses.F90 2825
Warning 56 warning #6075: The data type of the actual argument does not match the definition. [WORKSHEET] C:\NIESR\Prog_lab\nibax\DRAFT MODELS\30 - 23 Jun 2011\FORTRAN\6_analyses.F90 2834
My apologies if I am making an obvious error - there seem to me to be a number of candidates for the errors that I am obtaining that are referenced above (theKERNEL32 library, and themkl\lib\ia32 library directory). Unfortunately, my green-belt status is unlikely to do an injustice to my technical knowledge in relation to fortran programming...
Many thanks Steve,
Justin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is undoubtedly because you have not declared the variables RANGE and WORKSHEET properly, but it's an understandable error. These items are handles to COM objects and need to be the size of an address on the platform. If you simply declared them as INTEGER or INTEGER*4, you'd get this error.
Note that the problem is NOT that the rputines "aren't recognized" - they are. If they weren't recognized you'd get very different errors. In this case, the compiler is telling you that the datatypes of some arguments don't match the declared routine.
Since you have USEd KERNEL32, declare these variables to be:
INTEGER(HANDLE)
and that should do it for boh 32-bit and 64-bit.
Note that the problem is NOT that the rputines "aren't recognized" - they are. If they weren't recognized you'd get very different errors. In this case, the compiler is telling you that the datatypes of some arguments don't match the declared routine.
Since you have USEd KERNEL32, declare these variables to be:
INTEGER(HANDLE)
and that should do it for boh 32-bit and 64-bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many thanks Steve - 64 bit version compiled and up and running!
Justin.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page