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

Link error in Composer XE

Zhanghong_T_
Novice
892 Views
Dear all,

I have a project which works in IVF11.1 + VS2008. After I updated the compiler to Composer XE, the following errors displayed:

error LNK2001: unresolved external symbol _PDBX_updateMemory
error LNK2019: unresolved external symbol _PDBX_forkTask
error LNK2019: unresolved external symbol _PDBX_joinTask

Which libs should I add to the project?


BTW: the above problem happened at the debug (x64) version. The release (x64) version can be built.


Thanks,
Zhanghong Tang
0 Kudos
7 Replies
Steven_L_Intel1
Employee
892 Views
Would you please attach the .vfproj file for your project and the buildlog.htm file? These routines come from pdbx.lib which should be automatically linked in when you have enabled the parallel debugging feature.
0 Kudos
Zhanghong_T_
Novice
892 Views
Dear Dr. Steve,

Thank you very much for your kindly reply. The context of buildlog.htm is just what I pasted, but 20 errors.

The program is mixed project. The VF project creates a static library and the VC project include the main project and link to the static library. I have enabled the parallel debugging in VF project but didn't do in VC project. Could you please tell me how to enable the parallel debugging in VF project?


Thanks,
Zhanghong Tang
0 Kudos
Steven_L_Intel1
Employee
892 Views
Oh, I think I see what has happened. You are linking in C++ and the Fortran-compiled objects do not have the directive added to link in pdbx.lib. In the C++ project, open the properties, Linker. Under "Additional dependencies", add pdbx.lib . Make sure that under Tools > Options > Projects and Solutions > VC++ Directories > Library Files, you have the correct version of the Fortran LIB folder listed.
0 Kudos
Zhanghong_T_
Novice
892 Views
Dear Dr. Steve,

Thank you very much for your kindly reply. I have done what you said. I added phbx.lib under "Additional dependencies" and added pdbxinst.lib under "Ignore Specific Library". The previous errors displayed.

On the other hand, I tried to construct a solution with Fortran-C++ mixed projects and try to reproduce the problems. However, the sample solution works:(
I even needn't add the phbx.lib in the project setting.



Thanks,
Zhanghong Tang
0 Kudos
Zhanghong_T_
Novice
892 Views
Dear Dr. Steve,

A very interesting thing. According to you reminded, I added the 'pdbx.lib' to the VF project and remove it from VC project. This time the number of errors decreased to 2. They are:

error LNK2019: unresolved external symbol _PDBX_forkTask referenced in function XXX
error LNK2019: unresolved external symbol _PDBX_joinTask referenced in function XXX


Thanks,
Zhanghong Tang
0 Kudos
Zhanghong_T_
Novice
892 Views
Dear Dr. Steve,

The link problem solved after I added both pdbx.lib and pdbxinst.lib into the VF project.


Thanks,
Zhanghong Tang
0 Kudos
Steven_L_Intel1
Employee
892 Views
Glad to hear it.
0 Kudos
Reply