Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Объявления
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29282 Обсуждение

LNK2005 error _GETAQS already defined in getaqs.obj

ferrad01
Начинающий
606Просмотр.
I have a project which has a bunch of Fortran files, some of which are new versions of files which already exist in a library (OLIEngineCore.lib) which needs to be linked in to provide the remainder of the files the program needs. For example GETAQU exists in OLIEngineCore.lib, but I have a new version which I link directly.

However when I link I get:

error LNK2005: _GETAQS already defined in getaqs.obj OLIEngineCore.lib(getaqs.obj)

My understanding is that the linker should use the files linked in directly, then look in the library for the remainder, and ignore those from the library it does not need. Indeed that is how it has worked in the past to my knowledge.

Why am I getting this error?
0 баллов
1 Ответить
ferrad01
Начинающий
606Просмотр.
I found the problem. The calling convention has to be the same as in the library. In this case /CVF.
Ответить