Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Write access for .obj file

PASeeger
Beginner
189 Views

The big picture is that I need to migrate a 50,000-line Fortran code package from WinXP to Win10. The fatal flaw in trying to execute to old code seems to be a change in the API for mouse clicks. Full description of code: 

www.paseeger.com/documents/SPIE_5536(2004)109.pdf


The IMMEDIATE problem is that I have to learn to use Intel Fortran in the Win10 environment.  So far, I can't even compile the simplest program from a command line, because I can't get write access for the .obj file.  The folder C:\temp has the Read-only attribute set, and I can turn tat attribute off.  However, whenever I try to compile, it gets turned on aqain.  

This is the source file:
      Program hello
      print *, 'hello world'
      end program
This is the command screen:
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.
Intel(R) Compiler 18.0 Update 3 (package 210)
Setting environment for using Microsoft Visual Studio Shell 15.0 x86 tools.
C:\Program Files (x86)\IntelSWTools>ifort /c C:\temp\hello.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on IA-32, Version 18.0.3.210 Build 20180410
Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.
error: can't open file hello.obj for write
compilation aborted for C:\temp\hello.f90 (code 1)
 
 

 

 

 

0 Kudos
2 Replies
Steve_Lionel
Black Belt Retired Employee
189 Views

Don't do builds in the Temp folder. Windows and/or antimalware tools blocks things like that. Create a writable folder under your Desktop or in a folder that isn't under Program Files or Windows.

Lorri_M_Intel
Employee
189 Views

Your current working directory is the top level directory for the Intel Software tools (including the compiler).

By default, the compiler creates its object files in the current working directory, and no, you don't have "write" access to that directory.

Either create yourself a work area, as Steve suggested above, or set your current working directory to the Temp directory where you were able to create your source file.

                          --Lorri

Reply