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

Error Link2019 and Link 2001

lan0907
Beginner
681 Views

Hi,

I am here again. My apologize to appear here so often as an error generator instead of an error solver.

Now the errors are Link 2019 and Linke 2001 for all kinds of unresolved external symbols. They are mainly three types:

1. rhmuc_main.obj : error LNK2019: unresolved external symbol UEASSIGN_HOV_VOT referenced in function MAIN__

2. imsls_err.lib(e1lock.obj) : error LNK2001: unresolved external symbol __kmpc_global_thread_num

3. imsl.lib(r1t64.obj) : error LNK2001: unresolved external symbol __kmpc_global_thread_num

In the project property settings are as follows (I guess most of the solutions are to change some setting here):

1. linker>system: Subsystem is set as Console (/Subsystem: console)

2. linker>command line in the All Options I have:

/OUT:"x64\\Debug/lan.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"C:\x64\debug\lan.exe.intermediate.manifest" /DEBUG /PDB:"x64\Debug/lan.pdb" /SUBSYSTEM:CONSOLE kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

The codes do use IMSL library, and I guess I have included it correctly.

lan

0 Kudos
8 Replies
Steven_L_Intel1
Employee
681 Views

The second and third error can be fixed by adding the following to one of your sources:

!DEC$ OBJCOMMENT LIB:'libguide.lib'

I don't recognize UEASSIGN_HOV_VOT - is this one of your routines?

0 Kudos
lan0907
Beginner
681 Views

Hi,

The second and third errors have been solved by the magic command line!

Here is the structure of the project, there is a kind of main souce file which calls all different kinds of sub-codes (maybe wrong term?) step by step. And the first kind of errors are in the main code. Actually there are 3 errors of this kind. All of them are errors in calling the sub codes.

the UEASSIGN_HOV_VOT is one of the sub code which I can find in the Solution ExplorerWindow>Souce Files

For the rest of the two, I even can't find them in the project. Since the codes are not writtern by myself, I cann't fully understand them. I hope this makes the description of the error a little bit clearer.

Thanks,

Lan

0 Kudos
Steven_L_Intel1
Employee
681 Views

Don't worry about the other names that were not found - those come from Intel libraries.

UEASSIGN_HOV_VOT is the only problem here. Is this in a Fortran source file? Can you post the first 10 lines of that file here?

0 Kudos
lan0907
Beginner
681 Views
Hi Steve,
For the rest of the two names, I am not sure if they come from the Intel Library. The names are:

ROUTE_SWAP_UEHOV_VOT and COMPUTE_UEHOV_VOT_TOTAL_GA.

For the UEASSIGN_HOV.f, here are the first several lines from it. Please note, that this subroutine keeps on call other subroutines and functions.

--Wrong codes have been deleted!

0 Kudos
Steven_L_Intel1
Employee
681 Views

Those routines are from your application, not the Intel library. The source you posted is not for routine UEASSIGN_HOV_VOT which is the name the linker could not find. That source is for UEASSIGN_HOV, without the _VOT. Might there be another source that defines the longer name? Can you show me the line of source that calls UEASSIGN_HOV_VOT?

0 Kudos
lan0907
Beginner
681 Views
Hi Steve,
My apology for posting the wrong codes. Here is the codes:
-->wrong code has been deleted.
0 Kudos
Steven_L_Intel1
Employee
681 Views

Sorry, that's still not the right one. That one is UEASSIGN_LOV_VOT not UEASSIGN_HOV_VOT.

0 Kudos
lan0907
Beginner
681 Views
Dear Steve,
The errors have been solved, I asked one of my friend who knows the codes.
the solution is to add the subroutine codes into the project from the existing files.
Sorry for my carelessness, I was in a hurry to ran for the lectures.
Thanks,
Lan

0 Kudos
Reply