Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28477 Discussions

How to make CVF 6.0 and Visual Studio.net 2003 work together ??

tongru_huo
Beginner
602 Views
Steve,
I am new to this forum. But I found all the articles you posted are directly related to what I am doing. Thanks in advance for your help in answering
my question.

Recently I switched MS VC++6.0 to VS.net 2003 (academic version).
I spent a lot of days to try to resolve the following problem in vain.
The Fortran compiler I am still using is Compaq Digital Fortran 6.0.

The following piece of code (F77.FOR and test.cpp) can work well using
VC++6.0 and DF6.0. Both files
can still be compiled successfully and linked together successfully in
VC++7.0. The executable is not able to run. The running exits with code
255 and cannot even enter main.

C Fortran routine F77.FOR
C It is made as a static library in DF6.0.
subroutine F77(d1, d2)
double precision d1, d2
d2 = sqrt(d1)
return
end
The compiler options I used for F77.FOR is the following.
/check:bounds /compile_only /dbglibs /debug:full /include:"Debug/"
/nologo /warn:argument_checking /warn:nofileopt /module:"Debug/"
/object:"Debug/" /pdbfile:"Debug/DF60.PDB"

// C++ routine, test.cpp
// It is compiled in VC++7.0 and linked with F77.lib

extern "C" {
void _stdcall F77(double *d1, double *d2);
}
#include
int main()
{
double d1 = 100.0, d2;
d2 = sqrt(d1);
F77(&d1, &d2);
return 0;
}
The following is the compiler option I used in VC++ 7.0.
/Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Gm /EHsc /RTC1 /MLd /Fo"Debug/"
/Fd"Debug/vc70.pdb" /W3 /nologo /c /Wp64 /ZI /TP
The following is the link option I used in VC++ 7.0
/OUT:"Debug/Test.exe" /INCREMENTAL /NOLOGO /DEBUG /PDB:"Debug/Test.pdb"
/SUBSYSTEM:CONSOLE /MACHINE:X86 dfor.lib F77.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "Program FilesMicrosoft Visual StudioDf98LibDfor.lib"
Both fileswere compiled successfully respectively in DF6.0 and VC++ 7.0
without errors and warnings. The link in VC++ 7.0 is also successful with
errors and warnings.
The executable is not able to run. It always exits with code 255 (oxff).
It doesn't even enter main.


Thanks again for your time !

Best regards
Tony
0 Kudos
7 Replies
tongru_huo
Beginner
602 Views

One correction to my posting !

The link in VC++ 7.0 is also successful withOUT errors and warnings.

Important: OUT is missing in my previous posting.

0 Kudos
tongru_huo
Beginner
602 Views
Doesn't anyone have the similar problem ?
The code cannot be simpler. Both compile and link are clean without errors and warnings.Why the executable cannot even run ?
How are you guys able to use CVF 6.0 and MS.net 2003 together ?
If no one is able to and it is a product limitation of CVF6.0 (it cannot be used with MS.net 2003), why doesn't INTEL explicitly say it ??
If it is so, it will save people's time. I will consider drop either CVF 6.0 for IVF
or keep using VC++6.0.
Thanks
Tony
0 Kudos
Steven_L_Intel1
Employee
602 Views
First, CVF isn't Intel's product.
Second, CVF does not support use of VS.NET 2003. You can getr mixed-language applications to work if you compile the CVF code in CVF and link using the VS.NET linker, but there is no IDE or debug integration.
I have not looked at your particular case to see what may be wrong, but it is not a supported combination (in the sense that if you have problems, you're on your own.)
If you are developing mixed-language applications with VC.NET, the Intel compiler is a better choice.
0 Kudos
tongru_huo
Beginner
602 Views
I know CVF is the product of DEC. I don't know the relationship between IVF8.0 and CVF6.0. Is IVF8.0 developed from CVF6.0 ?
Before I can buy IVF6.0, I still need to rely on CVF6.0 to do the work.
And that's exactly what I did. Compile fortran codes in CVF6.0 and link with C++ codes in MS.net. But the executable does not run.
I can not imagine why it is so. Compile and link are without errors and warnings. The obj file is for the same machine. IDE and debug is not a problem here. If the executable can run, I can work without IDE and debug.
Does intel need to find why CVF6.0 doesn't work together with MS.net?
This will convince many many people to switch from CVF6.0 to IVF8.0, 9.0...
Regards
Tony
0 Kudos
Steven_L_Intel1
Employee
602 Views
IVF 8.0 is derived in part from CVF 6.6 - the CVF engineers now work for Intel. However, the CVF product itself still belongs to HP and HP now provides the support for it.
Intel isn't interested in why a particular CVF application doesn't work unless that same application doesn't work in IVF. You can download a free 30-day trial copy of IVF and try it for yourself.
I have built several applications with the combination of CVF and VC.NET and didn't have run-time problems.
0 Kudos
tongru_huo
Beginner
602 Views

Steve,

Before I decide to switch to IVF, I would like to make sure the problem

with CVF and MS.net. Since I don't use fortran compiler very often,

CVF is enough for me until now. If I can still use CVF, it will save me

some money. But if that is impossible, then I have no choice.

Could you put your CVF settings and MS.net settings here ?

Thanks

Tony

0 Kudos
Steven_L_Intel1
Employee
602 Views
It's not a case of "settings", really, other than adding the DF98LIB path to the "libraries" path used by VS.NET for linking. That's all I ever had to do.
0 Kudos
Reply