Cleaned "test1 - Debug"
-------------- Build: Debug in test1 (compiler: GNU Fortran Compiler)---------------
mingw32-gfortran.exe -Jobj\Debug\ -Wall -g -c D:\FORTRAN\COMMON.f95 -o obj\Debug\COMMON.o
mingw32-gfortran.exe -Jobj\Debug\ -Wall -g -c D:\FORTRAN\test1\main.f95 -o obj\Debug\test1\main.o
mingw32-gfortran.exe -Jobj\Debug\ -Wall -g -c D:\FORTRAN\ROGER21.F95 -o obj\Debug\ROGER21.o
mingw32-gfortran.exe -o bin\Debug\test1.exe obj\Debug\COMMON.o obj\Debug\test1\main.o obj\Debug\ROGER21.o
obj\Debug\ROGER21.o: In function `main':
D:/FORTRAN/ROGER21.F95:2: multiple definition of `main'
obj\Debug\test1\main.o:D:/FORTRAN/test1/main.f95:8: first defined here
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Thanks. I did as the instructions said and got a message that might as well have been written in Sanscrit.
It seems as if both common.f95 and roger21.f95 compiled to .o versions but both were considered to be main and therefore failed.
I have no idea what to do about it.CodeCleaned "test1 - Debug"
-------------- Build: Debug in test1 (compiler: GNU Fortran Compiler)---------------
mingw32-gfortran.exe -Jobj\Debug\ -Wall -g -c D:\FORTRAN\COMMON.f95 -o obj\Debug\COMMON.o
mingw32-gfortran.exe -Jobj\Debug\ -Wall -g -c D:\FORTRAN\test1\main.f95 -o obj\Debug\test1\main.o
mingw32-gfortran.exe -Jobj\Debug\ -Wall -g -c D:\FORTRAN\ROGER21.F95 -o obj\Debug\ROGER21.o
mingw32-gfortran.exe -o bin\Debug\test1.exe obj\Debug\COMMON.o obj\Debug\test1\main.o obj\Debug\ROGER21.o
obj\Debug\ROGER21.o: In function `main':
D:/FORTRAN/ROGER21.F95:2: multiple definition of `main'
obj\Debug\test1\main.o:D:/FORTRAN/test1/main.f95:8: first defined here
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Roger
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.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....
If I just compile my program it doesn't have the needed common moduleDo you have any idea what a module is? Can you explain it to me (remember i have no idea about fortran)?
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....
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...
I really dont get your problem and why you think c::b handles projects srrange.
Keep in mind that c::b is not a compiler but a ide. Cb has no idea about your main and he doesn't have to. C::b feeds all files from a project (there are exceptions e.g. Targets ) to the compiler. If you have multiple mains over multiple files in one project, then you confuse the compiler, because a program can have only one start point. But this has nothing to do with c::b...
This isn't a fortran problem. It's a CB problem. It's doing things I don't understand.
My program works perfectly as a single file but when I try to make it into a project, CB inserts fake programs in it's place.
Roger
Is there a reason you think this site support learning FORTRAN?
Did you try this site? http://darmar.vgtu.lt/ (http://darmar.vgtu.lt/)
Or the newer site http://cbfortran.sourceforge.net/ (http://cbfortran.sourceforge.net/)
Tim S.
PLEASE READ THE LINKS I POSTED; or I will ask you to be banned!
Is there a reason you think this site support learning FORTRAN?
Did you try this site? http://darmar.vgtu.lt/ (http://darmar.vgtu.lt/)
Or the newer site http://cbfortran.sourceforge.net/ (http://cbfortran.sourceforge.net/)
Tim S.