Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compiler produces same exe every time

Status
Not open for further replies.

salgerman

Programmer
Jan 14, 2010
520
US
O.k., before I re-installed g95 and swipe anything that might lead to the answer, I wanted to learn what could have gone wrong and what might be the solution without having to re-install, etc.

Anyway...

I have Windows XP and, in it, I have installed cygwin and, in it, I have installed g95.

Lately, I have only been using g95 to compile some of the short programs posted in this forum for the purpose of helping. Last time I tried to compile a short program, I noticed that the resulting *.exe did not correspond to the program I was compiling...instead, it corresponded to the one before it.

So, I delete the *.exe from the current directory, re-compile program and, again, when I execute the resulting *.exe, it keeps doing what the previous program was supposed to do.

Is this clear enough?

Any ideas on what is happening? I would like to learn what could be wrong, what 'left over file' might be corrupting my g95 installation...or something...

Any tips, tests, would be appreciated.

gsal
 
And how do you compile the program? Are you using the command line like
Code:
g95 my_source.f95 -o my_binary
or something else, for example makefile ?
 
no, no make file; just like you show...with and without -o option...

...never mind...I just went to try to do another experiment before replying and as it turns out, I must have overwritten my file with the other one...so, I guess g95 was doing what I was telling it to do, after all...sorry to bother... :~/

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top