Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2746

Linking error in Linux for polymorphic-class pointer allocation

$
0
0

Hi all,

I am having issues with the linking step for my program using ifort in ComposerXE 2013 (SP1) under Red Hat Linux.  The issue occurs when I try to do something like this:

    class(my_abstract_class), pointer :: ptr

​    type(my_subclass) :: obj ! where my_subclass extends my_abstract_class

    allocate(ptr, source = obj)  !<-- linker complains that there is an undefined reference to "for allocate"

I made sure to source "<ComposerXE Directory>/compilervars.csh intel64"

Are there any additional directories that may have not been included in my library path? Is this a known compiler issue with the linux version of ifort? The release notes for 2013 seem to indicate that this feature of fortran 2003 has been enabled

Thanks,
-Eric Uthoff


Viewing all articles
Browse latest Browse all 2746

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>