- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I am a quite novice ifort user. I need to compile my program with -ipo option. It fails with the message:
ifort_8.1.024/lib/for_main.o(.text+0x28): In function `main': undefined reference to `MAIN__'
It only works when I specify -ipo_obj as well. This compiler behaves the same way on the following short program:
program for_main integer :: a a = 0 end program for_mainAny idea? Thanx, Pavel
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try changing the name of your program from for_main to something else, as I think there is a library routine by that name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look plz at my output
[]$ ifort -c -ipo test.F90 []$ ifort -o test test.o ifort_8.1.024/lib/for_main.o(.text+0x28): In function `main': : undefined reference to `MAIN__' []$ nm test.o (nm shows nothing)
And using -ipo_obj
[]$ ifort -c -ipo -ipo_obj test.F90 []$ ifort -o test test.o (no errors) [pmankevi@nstmklel1 bld]$ nm test.o U for_set_reentrancy 0000000000000000 d LITPACK_0.0.0 0000000000000000 T MAIN__
I understand -ipo doesn't generate .o files the same way the compiler does without -ipo. But fortran user guied doesn't mention that I must specify -ipo_obj along with -ipo flag. Is it correct, or there is some other way of using -ipo without -ipo_obj and above error could be avoided?
Pavel
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page