[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 6777 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 90 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
Toilet paper or water?
Sajha Poll: Who is your favorite Nepali actress?
ढ्याउ गर्दा दसैँको खसी गनाउच
Problems of Nepalese students in US
Mamta kafle bhatt is still missing
Tourist Visa - Seeking Suggestions and Guidance
Nepali Passport Renewal
To Sajha admin
From Trump “I will revoke TPS, and deport them back to their country.”
Are Nepalese cheapstakes?
अरुणिमाले दोस्रो पोई भेट्टाइछिन्
wanna be ruled by stupid or an Idiot ?
MAGA denaturalization proposal!!
Nepali Psycho
advanced parole
seriously, when applying for tech jobs in TPS, what you guys say when they ask if you have green card?
How to Retrieve a Copy of Domestic Violence Complaint???
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