- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
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?
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?
Ссылка скопирована
1 Ответить
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
I found the problem. The calling convention has to be the same as in the library. In this case /CVF.

Ответить
Параметры темы
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати