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

module name conflict linking CVF application under IVF

sgongola
Beginner
761 Views
Our application has a module called for_init. It linked and worked under CVF. Under IVF 8.1 we get these messages:

libifcore.lib(for_init.obj) : error LNK2019: unresolved external symbol __pxcptinfoptrs referenced in function
_GETEXCEPTIONPTRSQQ
libifcore.lib(for_portlib.obj) : error LNK2019: unresolved external symbol _errno referenced in function ___msportlib_d_readchar
libm.lib(libm_error.obu) : error LNK2019: unresolved external symbol _errno referenced in function ___libm_error_support

I tried doing /nodefaultlib:libifcore.lib to exclude the library from the link and was unhappy with the results.

Can I do anything besides a large rewrite to rename my for_init to something else? We do command line compile/links with a makefile and hundreds of programs.

thank you
sol
0 Kudos
3 Replies
Steven_L_Intel1
Employee
761 Views
The problem you are having is not due to a module name conflict. Rather, you have "Multiple C Library Syndrome", caused by inconsistent specifications of which C libraries to link against.
Make sure that all sources are compiled with the same libraries option (/libs or one of the various /Mxx options) and that any C sources you compile are built with compatible options. In particular, don't mix threaded and non-threaded libraries.
/ignorelib is almost always the wrong solution to this problem.
0 Kudos
Gabriel_A_2
Beginner
761 Views

I have been reading a few threads lately trying to figure out my problem. This one came the closest.

I get similar error messages so I believe I have the "multiple C library syndrome".

I have a small C++ project (.NET 2003) with an Intel Fortran library (9.1). This is a migrated project from CVF andVS 6.

No matter which "run time" libraries I choose (C++ > Code Generation and Fortran > Libraries) I get several error messages during the link process, different for each 'similar' "run time" libraries selection. I would have assumed that C++ > Single threaded (/ML) was OK with Intel Fortran "Single threaded" selection (and other such 'similar'combinations). But all of them give me some linking error, very similar to the ones in this thread.

The original project was a mixed CPP/Fortran DLL converted to a C++ project with an attached Fortran library.

I realize that there is never enough information to really know what's going on but any comments are appreciated.

0 Kudos
Steven_L_Intel1
Employee
761 Views
Seeing the error messages would be useful, but I would suggest that you contact Intel Premier Support and supply an example that shows the problem, or at least, the build logs from the C and Fortran projects.
0 Kudos
Reply