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

how to ignore undefined reference

woshiwuxin
Novice
3,643 Views
Hi,
When compiling a program, "undefined reference to `asub_'" might occur. I know where the problem is, and pretty sure that the execution flow will not invoke `asub_' for debugging or testing. Is there any compiler options that I can ignore or circumvent those undefined references?
Thank you!
0 Kudos
3 Replies
woshiwuxin
Novice
3,643 Views
My present trick is to write a dummy subroutine, and the compiler can link the dummy. However, it would be good, if there is a more handy approache.
0 Kudos
Ron_Green
Moderator
3,643 Views
The compiler just creates object files and passes those off to 'ld' to do the linking (xild if -pgo is set, but same idea).

You'd need a linker option from 'ld' to support that. I don't know of any such option, so the stub or dummy subroutine is the only option I know of.

ron
0 Kudos
woshiwuxin
Novice
3,643 Views
Thank you!
After man ld, find this:-Wl,--warn-unresolved-symbols
Reply