- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually, I want to make clear, this isn't restricted to pointers but also to polymorphic with the "allocatable" keyword, for instance:
type(my_abstract_class), allocatable :: abs_obj
-Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually, I want to make clear, this isn't restricted to pointers but also to polymorphic variables with the "allocatable" keyword, for instance:
type(my_abstract_class), allocatable :: abs_obj
-Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please show a log of your build session including the command used for linking and the exact and complete error message. You have something fundamentally wrong in your build process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Steve,
Your comment got me to take another look at the link command and I found the issue.
In case you're curious:
I had included a folder in my link command (via -L <my_folder>) which I though contained some third party libraries that my program uses. I was not aware that it also contained copies of some ifort libraries from ifort v.10, (e.g. Libifcoremt, Libintlc and others). Since they were higher up in priority, these old versions of the libraries were being linked instead of the current version. Shockingly, until I started using some of the more advanced FORTRAN 2003 features, this was actually worked just fine and has remained undetected for months! Looks like this was just a bone-headed mistake (possibly by me).
Thanks for your time Steve!
-Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad to hear it.

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