Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
34 Views

Linking error while using quadpack

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
Highlighted
Black Belt
34 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.

0 Kudos
Highlighted
Valued Contributor II
34 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

 

0 Kudos
Highlighted
Beginner
34 Views

Dear mecej4 I used the quadpack as a library, to enhance its usage in the code.
0 Kudos
Highlighted
34 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
 
 
0 Kudos
Highlighted
Valued Contributor II
34 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.

0 Kudos
Highlighted
Black Belt
34 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.

0 Kudos