- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello
I'm new in Mac. I installed a demo version of Intel Fortran Compiler in mac os X leopard, I can't compile any program, not even the most simple:
program test
write(*,*) 'hello world'
end program
and the compiler shows this error:
ld: duplicate symbol _main in /Users/carloscorsi/Desktop/propedeutico/programacion/mar 26-05/ejercicio14/build/ejercicio14.build/Debug/ejercicio14.build/Objects-normal/i386/main.o and /opt/intel/Compiler/11.0/059/lib/for_main.o
could you please tell me how can I solve it?
thank you
I'm new in Mac. I installed a demo version of Intel Fortran Compiler in mac os X leopard, I can't compile any program, not even the most simple:
program test
write(*,*) 'hello world'
end program
and the compiler shows this error:
ld: duplicate symbol _main in /Users/carloscorsi/Desktop/propedeutico/programacion/mar 26-05/ejercicio14/build/ejercicio14.build/Debug/ejercicio14.build/Objects-normal/i386/main.o and /opt/intel/Compiler/11.0/059/lib/for_main.o
could you please tell me how can I solve it?
thank you
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - ccors
hello
I'm new in Mac. I installed a demo version of Intel Fortran Compiler in mac os X leopard, I can't compile any program, not even the most simple:
program test
write(*,*) 'hello world'
end program
and the compiler shows this error:
ld: duplicate symbol _main in /Users/carloscorsi/Desktop/propedeutico/programacion/mar 26-05/ejercicio14/build/ejercicio14.build/Debug/ejercicio14.build/Objects-normal/i386/main.o and /opt/intel/Compiler/11.0/059/lib/for_main.o
could you please tell me how can I solve it?
thank you
I'm new in Mac. I installed a demo version of Intel Fortran Compiler in mac os X leopard, I can't compile any program, not even the most simple:
program test
write(*,*) 'hello world'
end program
and the compiler shows this error:
ld: duplicate symbol _main in /Users/carloscorsi/Desktop/propedeutico/programacion/mar 26-05/ejercicio14/build/ejercicio14.build/Debug/ejercicio14.build/Objects-normal/i386/main.o and /opt/intel/Compiler/11.0/059/lib/for_main.o
could you please tell me how can I solve it?
thank you
strange one. So you compile with:
ifort -o test test.f90
? How are you compiling and linking the program?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Ronald Green (Intel)
strange one. So you compile with:
ifort -o test test.f90
? How are you compiling and linking the program?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
This is a common FAQ. As most Unix-like systems have a built-in "test" command, attempting to overload that name for your own unrelated purpose isn't recommended. This wouldn't necessarily explain a linker problem. When you get to running, you would be depending on your shell distinguishing "test" from "./test" et al.
I use Xcode to program and then clik "Build", I don't use the Terminal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - ccors
I use Xcode to program and then clik "Build", I don't use the Terminal
did you read the section in the documentation, the User's Guide, chapter "Building Applications with the XCode IDE"?
Documenation in /opt/intel/Compiler/11.0/053/Documentation/compiler_f/compiler_documentation_f.htm
Open in Safari or Firefox and navigate to that chapter, it's under 'User Guide' -> 'Building Applications'
It sounds like you either have 2 main programs in the sources for the project OR somehow you have a main.c source added to the project.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can try obtaining the Xcode Hello sample I provided under an earlier thread at:
http://software.intel.com/en-us/forums/showpost.php?p=76240
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok!
now it works!
thank you fortran masters!!
now it works!
thank you fortran masters!!
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