Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Fortran program

+3 votes
asked Jan 22 by marc (290 points)

I created a fortran program containing 1 main and 1 subroutine. When compiling i get the following error message: 

/usr/bin/ld: /tmp/ccdh3pFz.o: in function `main':
002Priem.f08:(.text+0x82b)  : multiple definition of `main'; /tmp/ccmU322l.o:main.f95:(.text+0x76): first defined here
collect2: error: ld returned 1 exit status
Can somebody help me to solve this error?

1 Answer

0 votes
answered Jan 23 by Peter Minarik (89,230 points)
It looks like you have multiple main programs.

Can you share your code for investigation?
asked Jan 23 by marc (290 points) Hello, please find the requested code below
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...