[Show all top banners]

anjeep
Replies to this thread:

More by anjeep
What people are reading
Subscribers
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 Compile FORTRAN CODE in LINUX
[VIEWED 6829 TIMES]
SAVE! for ease of future access.
Posted on 05-12-12 11:00 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

 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

 
Posted on 05-12-12 11:32 AM     [Snapshot: 33]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

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. 
 
Posted on 05-12-12 12:22 PM     [Snapshot: 70]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

 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

 
Posted on 05-12-12 12:49 PM     [Snapshot: 88]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 
 
Posted on 05-12-12 2:16 PM     [Snapshot: 117]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

 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

 
Posted on 05-12-12 4:06 PM     [Snapshot: 154]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

 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

 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 365 days
Recommended Popular Threads Controvertial Threads
शीर्षक जे पनि हुन सक्छ।
NRN card pros and cons?
TPS Re-registration case still pending ..
What are your first memories of when Nepal Television Began?
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
TPS Re-registration
Democrats are so sure Trump will win
Basnet or Basnyat ??
TPS EAD auto extended to June 2025 or just TPS?
nrn citizenship
Toilet paper or water?
Sajha has turned into MAGATs nest
Nas and The Bokas: Coming to a Night Club near you
Mamta kafle bhatt is still missing
ढ्याउ गर्दा दसैँको खसी गनाउच
ChatSansar.com Naya Nepal Chat
whats wrong living with your parents ?
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
3 most corrupt politicians in the world
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
Nas and The Bokas: Coming to a Night Club near you
Mr. Dipak Gyawali-ji Talk is Cheap. US sends $ 200 million to Nepal every year.
TPS Update : Jajarkot earthquake
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters