[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 8473 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 200 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
ChatSansar.com Naya Nepal Chat
सालीको चाक
Conservative discussions
tesla stock OMG !!
Looking for girl
Who is hottest nepali female?
TPS for Nepal likely to extend next week
I hope all the fake Nepali refugee get deported
Those who are in TPS, what’s your backup plan?
TPS To F-1 COS
Homeland Security revokes temporary status for 532,000 Cubans, Haitians, Nicaraguans and Venezuelans
Venezuela TPS lawuit
Embassy of Nepal might be able to help extend TPS for Nepal
Nepal TPS has been Extended !!!
TPS for Venezuela is terminated, only 60 days extension for transition period
Nepal TPS decision
Got my F1 reinstatement approved within 3 months(was out of F1 for almost 2 years)
ICE kidnapping people off the streets over op eds
Has anyone here successfully reinstated to F-1 status after a year-long gap following a drop from F-1?
Looking for girl
Who is hottest nepali female?
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