- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use ar to build a .a file, then you simply name the .a file in your ifort command that builds the executable as if it were a source file. For exsample:
ifort -o myprog myprog.f90 mathlib.a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your explanation. I am clear about how to call the library in Linux.
I still have some problems when I build my library. For example, my program is going to use G05CBF subroutine. So I found the source codes for all subroutines which will be called in G05CBF. They arethree more, g05cay.f, g05caz.f andx02ajf.f. Then I compiled them by using:
ifort -o g05cbf g05cbf.f g05cay.f g05caz.f x02ajf.f
I hope I can get g05cbf.o. Then I can do the same things for other subroutines used in my program. My goal is to put all .o files into library.
However I got the following error message:
/opt/intel/fc/9.0/lib/for_main.o(.text+0x41): In function `main':
: undefined reference to `MAIN__'
There is no MAIN function in each subroutine. How can I compile them? Any suggestion on building my own library for some specific subroutines?
Thanks!
Roy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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