- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have a problem with the random number generator _DRNUN that I used as
call drnun (NR, R)
where NR - Number of random numbers to generate. (Input)
R - Vector of length NR containing the random uniform (0,1)deviates. (Output).
It is fine to compile the code in Compaq visual Fortran. However, it gives me error message as "error LNK2019: unresolved external symbol _DRNUN referenced in function XXX". Could anyone please tell me what is wrong and how should I correct it?
Thanks for your time and I appreciate your help.
call drnun (NR, R)
where NR - Number of random numbers to generate. (Input)
R - Vector of length NR containing the random uniform (0,1)deviates. (Output).
It is fine to compile the code in Compaq visual Fortran. However, it gives me error message as "error LNK2019: unresolved external symbol _DRNUN referenced in function XXX". Could anyone please tell me what is wrong and how should I correct it?
Thanks for your time and I appreciate your help.
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DRNUN is an IMSL routine, and therefore you have to tell either the compiler or the linker that you are using IMSL.
Method 1:
Add the line:
USE NUMERICAL_LIBRARIES
right after the PROGRAM, SUBROUTINE or FUNCTION line of the code that calls DRNUN
Method 2:
Select Project..Add to Project..Files. Files of type: Library Files (.LIB). Browse to the Program FilesMicrosoft Visual StudioDF98IMSLLIB folder. Select all the .LIB files and click OK.
Steve
Method 1:
Add the line:
USE NUMERICAL_LIBRARIES
right after the PROGRAM, SUBROUTINE or FUNCTION line of the code that calls DRNUN
Method 2:
Select Project..Add to Project..Files. Files of type: Library Files (.LIB). Browse to the Program FilesMicrosoft Visual StudioDF98IMSLLIB folder. Select all the .LIB files and click OK.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
DRNUN is an IMSL routine, and therefore you have to tell either the compiler or the linker that you are using IMSL.
Method 1:
Add the line:
USE NUMERICAL_LIBRARIES
right after the PROGRAM, SUBROUTINE or FUNCTION line of the code that calls DRNUN
Method 2:
Select Project..Add to Project..Files. Files of type: Library Files (.LIB). Browse to the Program FilesMicrosoft Visual StudioDF98IMSLLIB folder. Select all the .LIB files and click OK.
Steve
Method 1:
Add the line:
USE NUMERICAL_LIBRARIES
right after the PROGRAM, SUBROUTINE or FUNCTION line of the code that calls DRNUN
Method 2:
Select Project..Add to Project..Files. Files of type: Library Files (.LIB). Browse to the Program FilesMicrosoft Visual StudioDF98IMSLLIB folder. Select all the .LIB files and click OK.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - crkkos
I tried the USE NUMERICAL LIBRARIES and couldnt get the function to work. I am using susedev1 and ifort 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Suse 10 that is
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel does not offer a package with IMSL on Linux. You can buy IMSL for Linux from Visual Numerics.
The Intel Math Kernel Library, included with Intel Fortran Professional Edition, has many random number generators. Otherwise, consider using the Fortran intrinsic RANDOM_NUMBER.
The Intel Math Kernel Library, included with Intel Fortran Professional Edition, has many random number generators. Otherwise, consider using the Fortran intrinsic RANDOM_NUMBER.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Peter
Did you try to use the method 2 ??

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page