Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29235 Discussions

Doubly defined symbol main in ifort 8.0

dfumento
Beginner
571 Views
Hi,
A program that worked with ifc gets a double defined symbol, 'main' error message. The symbol is now defined in library libifcore.a. I have a 'c' main program that has the conflicting symbol that calls the fortran. What should I do? Thanks, David

/usr/local/Intel/lib/for_main.o(.text+0x0): In function `main':
: multiple definition of `main'
mmio_convert.o(.text+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `main' changed from 1438 to 42 in /usr/local/Intel/lib/for_main.o
/usr/local/Intel/lib/for_main.o(.text+0x1c): In function `main':
: undefined reference to `MAIN__'
0 Kudos
2 Replies
Steven_L_Intel1
Employee
571 Views
Add the new switch -nofor_main to the build.
0 Kudos
dfumento
Beginner
571 Views
Thank you.
David
0 Kudos
Reply