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

Random function

renaud
Beginner
832 Views

I have a problem with the random function...
In one subroutine call "ranger" I have this kind of code :

REAL RAND
XALEAT=RAND()
The compilation of the subroutine shows no problem.

I have no problem with F77 but when I try to compile the main with ifc linked to a library I have :
In function `ranger_':
ranger.o(.text+0x12): undefined reference to `rand_'

What do you think ?

Renaud

0 Kudos
2 Replies
Steven_L_Intel1
Employee
832 Views
RAND is in the Portability Library, so add (the misnamed) -vaxlib switch to your compile command.

Steve
0 Kudos
Martyn_C_Intel
Employee
832 Views
Minor typo: -Vaxlib not -vaxlib

Martyn
0 Kudos
Reply