- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I am trying
to use Intel Fortran Compiler v10 and Visual Studio 2005 to build two projects
migrated from MSDEV 6 with Compaq Fortran compiler (of course those projects
built without any error in MSDEV 6).
However with VS 2005 I got two error:
1. One project linked without any error, the same file used in other project got link error 2019. The project settings are identical.
2. And link error 2001 on Fortran lib when it's using the external symbol defined in C code.
Any help it's very appreciated.
Thanks in advance.....
However with VS 2005 I got two error:
1. One project linked without any error, the same file used in other project got link error 2019. The project settings are identical.
2. And link error 2001 on Fortran lib when it's using the external symbol defined in C code.
Any help it's very appreciated.
Thanks in advance.....
Link kopiert
11 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Please show the exact and complete text of all the messages. The numbers alone tell us very little.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Thanks Steve for your help.
Here is the error:
deli_lib.lib(testv.obj) : error LNK2019: unresolved external symbol _simfx@0 referenced in function testv
For code:
....
CALL simfx
....
C code:
void simfx(void)
....
I checked other post and changed to call in for to:
!dec$ attributes default, stdcall, alias:'simfx' :: simfx
First of all not sure if this is correct, however I got compiling error:
C: est estv.for(1120) : Error: This symbol has multiply declared DEC$ ATTRIBUTES ALIAS attribute. [E0]
: Error: This symbol has multiply declared DEC$ ATTRIBUTES STDCALL attribute. [E0]
C: est estv.for(1120) : Error: This symbol has multiply declared DEC$ ATTRIBUTES DEFAULT attribute. [E0]
compilation aborted for C: est estv.for (code 1)
Here is the error:
deli_lib.lib(testv.obj) : error LNK2019: unresolved external symbol _simfx@0 referenced in function testv
For code:
....
CALL simfx
....
C code:
void simfx(void)
....
I checked other post and changed to call in for to:
!dec$ attributes default, stdcall, alias:'simfx' :: simfx
First of all not sure if this is correct, however I got compiling error:
C: est estv.for(1120) : Error: This symbol has multiply declared DEC$ ATTRIBUTES ALIAS attribute. [E0]
: Error: This symbol has multiply declared DEC$ ATTRIBUTES STDCALL attribute. [E0]
C: est estv.for(1120) : Error: This symbol has multiply declared DEC$ ATTRIBUTES DEFAULT attribute. [E0]
compilation aborted for C: est estv.for (code 1)
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
As you're changing the source code, it might be better to use ISO C binding.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Steve, is there any way I can avoid to change source code? (my code still need to be compitable with MSDEV 6 and Linux)
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
For simfx, change "stdcall" to "c" and remove the alias. I don't see how this would have worked under CVF. There's something else going on you're not showing us.
Please show us the ATTRIBUTES lines for EO.
Please show us the ATTRIBUTES lines for EO.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
You are right Steve, here is the line (in .for) I corrected and it works:
!DEC$ ATTRIBUTES C :: simfx
!DEC$ ATTRIBUTES C :: simfx1
However if I tried to use 'extern "C" void simfx()' in simfx code, and compile it as C++ I got link error on line: __declspec(dllimport). I had to remove extern "C" and compile it as C then it has no link error.
simfx c code:
void simfx_common()
.....
void simfx () {
simfx_common();
.....}
void simfx1() {
simfx_common();
.....}
However I still have another issue in this code (next link error):
testv.lib(dual.obj) : error LNK2019: unresolved external symbol _dummy_counter@0 referenced in function _visin
testv.lib(dual.obj) : error LNK2019: unresolved external symbol _initlog@0 referenced in function _visin
testv.lib(dual.obj) : error LNK2019: unresolved external symbol _trnl@24 referenced in function _visin
The way it's in .for code:
....
ISTATUS = dummy_counter()
....
ISTATUS = initcaelog()
....
ISTATUS = TRNL('RUN_VISUAL',LOG_LEN,INTERFACE,0)
all declared in a seperate lib which I linked to my C project, I have no control on that lib, how I could get rid of such link errors?
Thanks a million.
!DEC$ ATTRIBUTES C :: simfx
!DEC$ ATTRIBUTES C :: simfx1
However if I tried to use 'extern "C" void simfx()' in simfx code, and compile it as C++ I got link error on line: __declspec(dllimport). I had to remove extern "C" and compile it as C then it has no link error.
simfx c code:
void simfx_common()
.....
void simfx () {
simfx_common();
.....}
void simfx1() {
simfx_common();
.....}
However I still have another issue in this code (next link error):
testv.lib(dual.obj) : error LNK2019: unresolved external symbol _dummy_counter@0 referenced in function _visin
testv.lib(dual.obj) : error LNK2019: unresolved external symbol _initlog@0 referenced in function _visin
testv.lib(dual.obj) : error LNK2019: unresolved external symbol _trnl@24 referenced in function _visin
The way it's in .for code:
....
ISTATUS = dummy_counter()
....
ISTATUS = initcaelog()
....
ISTATUS = TRNL('RUN_VISUAL',LOG_LEN,INTERFACE,0)
all declared in a seperate lib which I linked to my C project, I have no control on that lib, how I could get rid of such link errors?
Thanks a million.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Not enough information - I'd need to see the actual library and code. If you want to submit an Intel Premier Support issue and attach a ZIP of your projects and ask that it be assigned to me, I'll take a look.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Steve, I am trying to find a way how to submit the support request as I can't send any code to you guys due to data issues.
However, I did another test and put those modules under another projetc (in same solution) and there is no link errors, what could cause such errors under my current project?
However, I did another test and put those modules under another projetc (in same solution) and there is no link errors, what could cause such errors under my current project?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Problem fixed, automated conversion set /iface:cvf instead of /iface:cref (OK for another project but not for the current one), maybe the bug in automated conversion tool?.....
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Did you have /iface:cref in the CVF project? If so, then yes, that's a tool bug and please report it.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
the only reason is: you must link some lib files, while Microsoft change these lib files and they forget to tell you, or you need see some more informations about the changes from vc6 to vs2005!
Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite