Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
29306 Discussions

Using a C library in a Fortran program causes errors about multiply defined symbols

arjen_markus1
Beginner
547 Views
Hello,

I am trying to use a C library in a Fortran program. This used to work fine
with MSVC 6.0 and CVF 6.6, but I am trying out the Intel Fortran 9.1 compiler
and therefore also Visual C++.net.

When linking the program I get messages about _malloc() and a whole lot more:

Test_04 error LNK2005: ___sbh_alloc_block already defined in LIBC.lib(sbheap.obj)

How should I proceed? I have not specified any libraries in particular (beyond my own one) and the project was converted automatically from the previous version.

Regards,

Arjen

0 Kudos
1 Reply
arjen_markus1
Beginner
547 Views
Found the solution: /NODEFAULTLIB:libcd

At the very end of the long list of messages there was this suggestion
and that did the trick.

Regards,

Arjen

0 Kudos
Reply