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

Visual Fotran 6.6 and C .NET

paal
Beginner
388 Views
Hi,

new at this CVF 6.6 and C integration. I'v got a pretty basic C-program (not C++) and I want to use the main routine as a wrapper to my F77 program.

I manage to compile my main.c to main.obj with .NET
I then include the main.obj as part of the resources in my Visual Fortran project, and I compile the .F files OK.
Linking crashes with the following spectacle:

--------------------Configuration: cc - Win32 Debug--------------------
Compiling Fortran...
D:homeworkmay2003fconappsrcseval.f
D:homeworkmay2003fconappsrcinitpar.f
D:homeworkmay2003fconappsrchydratetemp.f
D:homeworkmay2003fconappsrchydrateeqs2subcooled.f
D:homeworkmay2003fconappsrcFhydrate.f
D:homeworkmay2003fconappsrcdlinpk.f
D:homeworkmay2003fconappsrcddaspk.f
D:homeworkmay2003fconappsrcdaux.f
D:homeworkmay2003fconappsrcicubic2.f
D:homeworkmay2003fconappsrcaxialeqs.f
D:homeworkmay2003fconappsrcspline.f
Linking...
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
   Creating library Debug/cc.lib and object Debug/cc.exp
LINK : warning LNK4049: locally defined symbol "_TDPAR" imported
LINK : warning LNK4049: locally defined symbol "_HYDRATKURVE" imported
LINK : warning LNK4049: locally defined symbol "_AXIALGRID" imported
LINK : warning LNK4049: locally defined symbol "_GRIDPAR" imported
LINK : warning LNK4049: locally defined symbol "_PARAMS" imported
LINK : warning LNK4049: locally defined symbol "_FLUXDATA" imported
main.obj : error LNK2001: unresolved external symbol __RTC_CheckEsp
main.obj : error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
main.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
main.obj : error LNK2001: unresolved external symbol __RTC_InitBase
Debug/cc.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.

cc.exe - 5 error(s), 7 warning(s)


As you can see it seems that the linker gives up at the time when it should be linking to the main.obj file.

My suspicion is that the C-code generated from the .NET thing is not compatible with the obj code required by the visual studio that CVF 6.6 uses. Am I right?

Any workarounds? I'm not able to get my C.NET to work with the .obj files from Fortran either ...

Cheers,

-Paal
0 Kudos
1 Reply
gfthomas8
Novice
388 Views
Try the reverse,ie, use the .net linker instead of the VS 6 linker. Also, I believe that debug symbols for c.net differ from those used by VS 6 but I haven't confirmed this and in any event I think that having the latest dbghelp.dll (6.1.0017.2) should make this a non issue, maybe.

HTH,
Gerry T.
0 Kudos
Reply