Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Linking error while using quadpack

Trader__Mahdi
Beginner
147 Views
Hi I am trying to use the quadpack library subroutines in my program. But the following error occurs: error LNK2019: unresolved external symbol _QWGTC referenced in function _QUADPACK_mp_QC25C The error relates to the linking of the main program to the library. would you please kindly direct how to solve the problem? Regarads
0 Kudos
6 Replies
mecej4
Black Belt
147 Views

What was the purpose of putting the Quadpack code into a module? To USE or not to USE the module, is the the question.

Arjen_Markus
Valued Contributor III
147 Views

The routine defines the weighing function for the Cauchy principal integral. Strange, I have a double precision version of the code where this function is present:

      double precision function dqwgtc(x,c,p2,p3,p4,kp)

c*********************************************************************72
c
cc DQWGTC defines the weight function used by DQC25C.
c
c***begin prologue  dqwgtc
c***refer to dqk15w
c***routines called  (none)
c***revision date  810101   (yymmdd)
c***keywords  weight function, cauchy principal value
c***author  piessens,robert,appl. math. & progr. div. - k.u.leuven
c           de doncker,elise,appl. math. & progr. div. - k.u.leuven
c***purpose  this function subprogram is used together with the
c            routine qawc and defines the weight function.
c***end prologue  dqwgtc
c
      double precision c,p2,p3,p4,x
      integer kp
c***first executable statement  dqwgtc
      dqwgtc = 0.1d+01/(x-c)
      return
      end

 

Trader__Mahdi
Beginner
147 Views
Dear mecej4 I used the quadpack as a library, to enhance its usage in the code.
raoudha__chaabane
147 Views

 
 
4- i push start 
5- a black screen appear an instant then he diseappear
 
6- please correct me the steps iin order to run my fortran code 
thanks 
 
raoudha 
enim leste tunisia
 
 
Arjen_Markus
Valued Contributor III
147 Views

Raoudha, your post does not seem in any way related to the previous ones. Please use a new thread, as that is less confusing.

And please add some details - I get the impression that you are not familiar with the compile and link steps, though that can be a very inadequate impression. Yet another reason to use a new thread and provide us with more details.

mecej4
Black Belt
147 Views

Trader, Mahdi wrote:
 I used the quadpack as a library, to enhance its usage in the code.

Putting reusable code in a library is fine, but enclosing the code in a module has consequences that may not be beneficial. To use code that is in a library and is embedded in a module, you must have the *.mod files available to the compiler and you must include a USE <module_name> statement in your code. As you can see from the linker message, the subroutine name has been modified as a result of your putting it inside a module. If you insert a USE statement, the compiler will produce the same name as an external name, and the linker will have no problems matching the names up.

Reply