User forums > Using Code::Blocks
projects
oBFusCATed:
The problem is that you have two main functions.
One in ROGER21.F95 and one in main.f95.
This is what the output is telling you.
Knowing this information you should be able to fix your problem.
rogerh:
Great.
Now it's complaining that main ISN'T in there.
Roger
rogerh:
Ok everytime I try to start a new project, CB puts a main in it that gives me "Hello world." no matter what I do.
If I just compile my program it doesn't have the needed common module
Roger
BlueHazzard:
FYI: I have absolute no idea about fortran, but i think at the compiling level it is the same as c...
--- Quote from: rogerh on July 30, 2015, 10:25:12 pm ---Ok everytime I try to start a new project, CB puts a main in it that gives me "Hello world." no matter what I do.
--- End quote ---
Well, you simply can overwrite this code with your own, or you simply remove the pre created file from the project with a right click and remove file....
--- Quote from: rogerh on July 30, 2015, 10:25:12 pm ---If I just compile my program it doesn't have the needed common module
--- End quote ---
Do you have any idea what a module is? Can you explain it to me (remember i have no idea about fortran)?
If you have compiler problems ALWAYS add a reabuild log with your post, because this is the only way we can try to get an idea about what is going on...
rogerh:
--- Quote from: BlueHazzard on July 31, 2015, 12:41:17 am ---Well, you simply can overwrite this code with your own, or you simply remove the pre created file from the project with a right click and remove file....
--- End quote ---
That worked! Progress.
--- Quote ---Do you have any idea what a module is? Can you explain it to me (remember i have no idea about fortran)?
--- End quote ---
Fortran used to have common blocks inside the program listing variables to be shared with the subroutines. Now they can be put in an external file and referenced in the program.
--- Quote ---If you have compiler problems ALWAYS add a reabuild log with your post, because this is the only way we can try to get an idea about what is going on...
--- End quote ---
The problem now is getting the main into the project. CB has a strange way of handling the contents of a project.
Roger
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version