Silverfrost Forums

Welcome to our forums

Can't find the object file

15 Feb 2016 10:01 #17195

Hi, I'm using the latest download of the FTN Express and looked at the Window 10 (64 bit) environmental parameters and the Plato project parameters and found them all (apparently) in order. However, when I try a simple FTN program by using the Plato 'start' button I get this message:

Compilation completed with no errors. Linking... *** Could not open: C:\Users\Antec300i7-3930k\Documents\Silverfrost FTN95 Express\CheckMate\Win32\First.obj

Although the First.obj (0 bytes) exists in the appropriate directory when I use the Windows Explorer. All the other files e.g. *.lst, Errorlog, etc exist in their appropriate directories.

I did find when using a simple compilation this error message although the compiler claims to have found no errors:

Compiling file: First.f95 Access violation: The instruction at address 00538f36 attempted to write to location 7fff0000 00538e25 generate_default_pattern(<ptr>char,<ptr>structᅣtype_definition) [+0111]

0050d9f0 allocate_static_object(<ptr>structᅣscoped_entity) [+02d1]

004c1e0f allocate_a_variable(<ptr>structᅣscoped_entity,<ptr>structᅣscope)#42 [+02d2]

004c24ea allocate_all_the_vars(<ptr>structᅣscoped_entity,<ptr>structᅣscope)#42 [+004d]

004c290c allocate_var_space(<ptr>structᅣscope) [+1b38]

00416e11 end_function(int) [+0565]

00418c00 parse_end_statement(<ptr>char,int,<ref>int) [+0b89]

etc.

Any link between the two errors?

I would be grateful for a solution!

From the frozen (<-30 C night time) Ottawa Can.

Gerrit JvB.

15 Feb 2016 10:49 #17196

If the .obj file has a length of 0 bytes, it doesn't contain much object code, does it?

It looks as though the compilation failed.

16 Feb 2016 12:26 #17199

Well, yes. And that's why I'm stuck and pleading for some wisdom from those more knowledgeable than me.

Gerrit

16 Feb 2016 12:35 #17200

Your path to first.obj scares me. I never know if there is an access rights problem.

I would create a directory c:\temp\ftn95_test Copy first.f95 into that directory and see what happens.

Make sure you have the fvars.bat path and environment variables set correctly ( if you are not using .net, you can leave out the .net path setting ) (you probably do, otherwise you would not have run ftn95)

16 Feb 2016 3:58 #17201

Or just check first your installation is OK by compiling the program from the command prompt

FTN95 name.for

which produces onj file if all is ok or

FTN95 name.for /link

to get just the EXE

Use /free if it is free fortran source format (132 columns)

If it goes OK then do things other suggested

/* From the +23C finally hot, sunny, spring blooming Califfornia

16 Feb 2016 9:33 #17203

I agree with Dan, although he had finger trouble, and it is .obj not .onj.

Even simpler, use the /LGO switch:

FTN95 /LGO first.for

because this does the linker stage automatically, and has the added benefit that if it does run, and you are using the personal edition, you don't have to wait for the 6-second 'naggging' display to go away.

Your program first.for is probably quite short, so why not post it here?

How you compile from the command prompt may also be arcane knowledge to you. In Windows 10, from the start menu, choose 'all apps' and after that, one of the 'Windows Power Shell' options that allow you to type in the commands that Dan or I recommend. You may need to use cd to start in the folder where you have put your first.for file.

Update: The Windows 'Command Prompt' is still there in the start menu under 'Windows system', but on my computers the font size is unacceptably small.

16 Feb 2016 7:04 #17206

Hi to all,

Pardon me for smiling in my long white beard. I learned Fortran on a CDC3100 (mainframe booted from paper tape). And later migrated my programs to an IBM DOS machine. Much to the amusement of professional programmers who used Assembler and COBOL and claimed that Fortran was as dead as Latin.......

I tried Dan's approach and found:

c:\ftn95 first.for /free [FTN95/win32 ver 5.40.0 copyright....etc.]

and then up popped this finger into my eye:

Runtime error from program:c:\program files (x86)\silverfrost\ftn95 express\ftn95.exe Access Violation The instruction at address 00538f51 attempted to write to location 7fff0000

00538e25 generate_default_pattern(<ptr>char,<ptr>structÄtype_definition) [+012c]

0050d9f0 allocate_static_object(<ptr>structÄscoped_entity) [+02d1]

004c1e0f allocate_a_variable(<ptr>structÄscoped_entity,<ptr>structÄscope)#42 [+02d2]

004c24ea allocate_all_the_vars(<ptr>structÄscoped_entity,<ptr>structÄscope)#42 [+004d]

004c290c allocate_var_space(<ptr>structÄscope) [+1b38]

00416e11 end_function(int) [+0565]

00418c00 parse_end_statement(<ptr>char,int,<ref>int) [+0b89]

004124a7 handle_token(<ptr>cha¬×„OµP eax=00000000 ebx=00000000 ecx=00000004 edx=00000000 esi=00000007 edi=7fff0000 ebp=0384ed30 esp=0384ece0 IOPL=2 ds=002b es=002b fs=0053 gs=002b cs=0023 ss=002b flgs=00210202 [NC OP NZ SN DN NV]

00538f51 rep
00538f52 stosb
00538f53 pop edi

Which is the same error as that which came out of the Plato workbench and was found in c:\error.txt The execution run did produce a c:\first.obj file of 0 bytes. The Fortran program is straight out of the Plato Help:

Program First WINAPP integer i real :: x=0.0 do i=1,10 print* ,x,x*x x = x+0.25 end do end program First

Gerrit

16 Feb 2016 9:03 #17207

Gerrit, I tried to compile your code naming it with a .for extension, and it wouldn't compile. So I renamed it .f90 (OK, I could have said /free for the format) and it compiled, giving output in a DOS window. Then I moved WINAPP to in front of the PROGRAM statement, and it compiled and ran with output in a proper window.

Then I put it into Plato, as supplied with WINAPP after PROGRAM, and I could compile it with no errors, and run it.

So I'm stumped.

Eddie

16 Feb 2016 9:04 #17208

Gerrit, I tried to compile your code naming it with a .for extension, and it wouldn't compile. So I renamed it .f90 (OK, I could have said /free for the format) and it compiled, giving output in a DOS window. Then I moved WINAPP to in front of the PROGRAM statement, and it compiled and ran with output in a proper window.

Then I put it into Plato, as supplied with WINAPP after PROGRAM, and I could compile it with no errors, and run it.

So I'm stumped.

Eddie

16 Feb 2016 9:04 #17209

Gerrit, I tried to compile your code naming it with a .for extension, and it wouldn't compile. So I renamed it .f90 (OK, I could have said /free for the format) and it compiled, giving output in a DOS window. Then I moved WINAPP to in front of the PROGRAM statement, and it compiled and ran with output in a proper window.

Then I put it into Plato, as supplied with WINAPP after PROGRAM, and I could compile it with no errors, and run it.

So I'm stumped.

Eddie

16 Feb 2016 9:07 #17210

Gerrit, I tried to compile your code naming it with a .for extension, and it wouldn't compile. So I renamed it .f90 (OK, I could have said /free for the format) and it compiled, giving output in a DOS window. Then I moved WINAPP to in front of the PROGRAM statement, and it compiled and ran with output in a proper window.

Then I put it into Plato, as supplied with WINAPP after PROGRAM, and I could compile it with no errors, and run it.

So I'm stumped.

Eddie

16 Feb 2016 9:55 #17211

Gerrit,

You initially claimed 'I'm using the latest download of the FTN Express and looked at the Window 10 (64 bit) environmental parameters'

Your latest trace gives '[FTN95/win32 ver 5.40.0 copyright....etc.] '

Is this true ? as Ver 5.40.0 is very old and may not run on Windows 10. I tried to run Ver 5.01 recently and it failed.

John

17 Feb 2016 1:02 #17212

Thank you JohnCampbell!

Fortunately I have another Windows 10 system and I downloaded the 'Personal' version of the FTN95 compiler. That's version 7.20. The compilation and execution of the sample program went as is to be expected.

My error was in assuming that the download for the FTN95 Express would be the latest version of a slightly different expression of the Silverfrost FTN compiler.

I'll uninstall the old stuff and download the appropriate zip file.

Thanks to all for your concern and attention.

May your code always be elegant and literate! Gerrit P.S. 46 cm of snow in the last 8 hours and still snowing.

17 Feb 2016 1:20 #17213

Gerrit,

Good to hear you have fixed the problem. Not sure what the FTN95 Express version is, but maybe it should be checked to be compatible with Windows 10.

John

P.S. 25 degC, sunny and a chance of rain overnight

17 Feb 2016 3:16 #17215

Quoted from GerritJvB Much to the amusement of professional programmers who used Assembler and COBOL and claimed that Fortran was as dead as Latin....... Gerrit

Fortran is kind of a special case. Not only not dead, but getting younger and younger. And more and more capable and powerful. It will not die even in year 3000. Natural intuitive simplicity, legacy and speed are always #1, #2 and #3 in demand.

Please login to reply.