HI I have around 200 subroutines (may be more) and I have compiled that program with windows. However, I need to recompile that code in LINUX platform. But whenever I try to compile that in linux I always get error. The common error I get is "undefined reference to main __". As a new user of linux platform I don't know what that means and how to fix it. This is the same code that runs on windows. Please help me asap. Thanks. Anjeep
anjeep · May 12, 2012 11:00 AM · 15,242 views
Are you familiar with make files in Linux? I used CMake to compile the codes in Linux. I recently had to compile C codes to executables and fortran codes as a library. It worked for me.
bbcnews · May 12, 2012 11:32 AM
HI BBCnews, Thanks for your reply. Its been just a couple of days I am working fortran in LInux environment. During a lot of search in the internet I knew a little about the make files but I don't know how to make one. I would appreciate if you could tell why I got that error "undefined reference to main_". Thanks. Anjeep
anjeep · May 12, 2012 12:22 PM
this might help: http://software.intel.com/en-u...
bbcnews · May 12, 2012 12:49 PM
HI bbcnews, Thanks for your reply. I have compiled all the individual files with -c command and then used ifort *.o -o program then the program is created. However, when I try to run the program it gives the error " forttl : No such file or directory fortt1 : severed (29): file not found, unit 1 Acutally I have the input file on the same folder. I don't know why I am getting such error ? Any help is appeciated. Thanks. Anjeep
anjeep · May 12, 2012 2:16 PM
Hi bbcnews, I found the source of my error. Actually I didn't care LInux is case sensitive. When I changed the case of the input files then the program worked perfectly. In windows I didn't have any problem with case of the input files. Thanks. Anjeep
anjeep · May 12, 2012 4:06 PM
This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.
Start a New Discussion