- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Intel fortran 9.1 EM64T compiler to compile fortran sources on Windows 64 bit XP machine. I am bit confused about the symbols that the are generated in the *.obj files. All the symbols are being generated without a leading underscore. For example if there is a subroutine test in the the test.f file, the corresponding naming convention symbol in the test.obj file compiled with EM64T ifort, is TEST without a leading underscore.
But If I use IA32, the symbols are like _TEST. I am callingthe C functions in Fortran, in Ccode I am using the default _cdecl calling convention so the symbols are being generated with a leading underscore. But using EM64T ifort the symbols are generated without a leading underscore.
For 64bit WINDOWS XP machine, which compiler do I need to use IA32 or EM64T?
If I should use EM64T what about the symbols i.e naming convention, I had reffered the intel documentation on Mixed language coding but not able to get any clue.
Looking for Help.
Regards,
Manoj
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's not a question of whether your hardware supports 64-bit; if you run 32-bit Windows on 64-bit hardward, you have the same limitations to ia32 compilers which you have on 32-bit hardware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's not a question of whether your hardware supports 64-bit; if you run 32-bit Windows on 64-bit hardward, you have the same limitations to ia32 compilers which you have on 32-bit hardware.
Hi Tim,
Thanks for your response. May be I am not clear in my question, Let me explain my issue correctly.
I am using EM64T ifort compiler on Windows XP 64 bit. I dont have any intentions to use the same executable or libraries on 32bit also.
My source codes have a Mixed Language C & Fortran. So some functions are need to called interchangbly either in Fortran or C. I am having Linking issues because all my fortran sources codes are not able to recognise the C functions.
When I checked the symbols in the fortran source codes, all the symbols in Obj files are generated with a leading underscore "_".
For example I have test.c file which had functiontest
test.c file
int test() {
/* Do something */
return;
}
This test.c file is compiled as library so _TEST symbol is available in that library (test.lib for suppose)
Now I have a fortran code
Program main
....
call test
...
end
To generate the executable I had linked test.lib, but in the fortran obj file the symbol is generated as TEST and linker give the error UNRESOLVED EXTERNAL TEST.
So my question why the em64t ifort is not generating the symbols as _TEST ( which is default convention in IA32 ifort and _cdecl for C).
Regards,
Manoj
- 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
Hi Steve,
Thank you very much for your response.
Now I understand that for Microsoft Windows 64-bit, the underscore will not be there.
How can I do the Mixed language coding on 64bitusing Fortran & C, what calling conventions I should use. For C codes if I use the default (_cdecl) .NET 2005 is generating symbols with a leading underscore, but the em64t ifort is generating the symbols in obj files without a leading underscore. This is creating the unresolved Linker symbols.
Regards,
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That should not/can not happen. I've just performed a small test with VC++ compiler in VS 2005, and the x64 .obj file does not contain the leading underscore, while Win32 does. Please double-check your settings or .obj file paths.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page