Software Archive
Read-only legacy content
17061 Discussions

Compiling/linking C/FORTRAN mixed lang.

gpierce
Beginner
427 Views
I'm working on a mixed I++ (MC)/FORT RAN application and encountered all of the "routine" link problems discussed in this forum.

dfor.lib(matherr.obj) : error LNK2005: __math err already defined in msvcrt.lib(merr.obj)

I have read the discussion threads and the newsletter article and while my problem is not yet completely solved, I'm getting closer. One of the things folks suggest is to check Project-Settings-Fort ran, Libraries "Use debug C libraries". I can't find this check box. I have VC++6.0 Enterprise and CVF6.6 installed... I do see a "Use Common Windows Libraries" option under the Other Library Options list. Is there something wrong with my installation?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
427 Views
No, there is nothing wrong with your installation. The problem is caused by Microsoft making a design error in how they package their libraries.

The easiest solution to this is to add dfor.lib to the list of libraries in Project..Settings..Link. (Use dformt.lib if you are linking multithreaded).

Steve
0 Kudos
Reply