IonicWind Software

IWBasic => General Questions => Topic started by: oneplace on May 22, 2008, 08:59:44 PM

Title: Not compiling
Post by: oneplace on May 22, 2008, 08:59:44 PM
Here is a sample file:
I am have a problem just getting this file to write to a file. I get this when I try to compile the file.
"No input files specified"

and it does not open the file or compile it.

OPENCONSOLE
DEF myfile as FILE
DEF one as STRING
one = "hello"
IF OPENFILE(myfile, "C:\\clock\\my.txt", "W") = 0
    WRITE myfile, one
    CLOSEFILE myfile
ENDIF

PRINT "Press Any Key To Close"
DO:UNTIL INKEY$ <> ""
CLOSECONSOLE
END
Title: Re: Not compiling
Post by: billhsln on May 22, 2008, 09:16:34 PM
Could it be because the C:\CLOCK directory does not exists????

Try:

OPENCONSOLE
DEF myfile as FILE
DEF one as STRING
one = "hello"
IF OPENFILE(myfile, "C:\\clock\\my.txt", "W") = 0
    PRINT "OPENED"
    WRITE myfile, one
    CLOSEFILE myfile
ELSE
    PRINT "PROBLEMS OPENING FILE"
ENDIF

PRINT "Press Any Key To Close"
DO:UNTIL INKEY$ <> ""
CLOSECONSOLE
END


Bill
Title: Re: Not compiling
Post by: oneplace on May 22, 2008, 09:36:08 PM
I found what the problem was:
I am running vista and I had the user account control set to "on"
Once I shut it off it works fine.

Thank you
Title: Re: Not compiling
Post by: pistol350 on May 23, 2008, 04:05:37 AM
Quote from: oneplace on May 22, 2008, 09:36:08 PM
I found what the problem was:
I am running vista and I had the user account control set to "on"
Once I shut it off it works fine.

Thank you

I don't use Vista, but i am not sure about the solution you mentioned,
so try this code :

OPENCONSOLE
DEF myfile as FILE
DEF one as STRING
DEF myDirectory as STRING
one = "hello"
myDirectory = "C:\\clock"

IF FINDOPEN(myDirectory)
PRINT "Directory exists, so let's open the file."
GOTO InDirectory
ELSE
PRINT "Directory does not exist.Let's create a new directory."
IF CREATEDIR(myDirectory)
PRINT myDirectory+" WAS CREATED"

LABEL InDirectory
IF OPENFILE(myfile, "C:\\clock\\my.txt", "W") = 0
PRINT "FILE OPENED"
WRITE myfile, one
CLOSEFILE myfile
ELSE
PRINT "PROBLEMS OPENING FILE"
ENDIF
ELSE
PRINT "could not create directory"
ENDIF
ENDIF
PRINT "Press Any Key To Close"
DO:UNTIL INKEY$ <> ""
CLOSECONSOLE
END


Title: Re: Not compiling
Post by: Ionic Wind Support Team on May 23, 2008, 06:56:10 PM
Peter,
His problem was compiling, not executing.  Vista UAC prevents a program from creating files in the Program Files directory when using a standard user account.  The compiler creates a temporary file in the \bin directory containing link targets for the linker.

Generally you have to be use an admin account under Vista to use compilers. 

If it were a project, and not a single file compile, it probably would have worked fine as I changed Emergence a while back to allow the relink all functions and that temporary file exisits in the project directory instead.

Paul.
Title: Re: Not compiling
Post by: ExMember001 on May 23, 2008, 09:10:06 PM
the best way i found under vista is to install Emergence in the User directory
this way you can make change easily.
Title: Re: Not compiling
Post by: pistol350 on May 24, 2008, 09:31:00 AM
Quote from: Paul Turley on May 23, 2008, 06:56:10 PM
Peter,
His problem was compiling, not executing.  Vista UAC prevents a program from creating files in the Program Files directory when using a standard user account.  The compiler creates a temporary file in the \bin directory containing link targets for the linker.

Generally you have to be use an admin account under Vista to use compilers. 

If it were a project, and not a single file compile, it probably would have worked fine as I changed Emergence a while back to allow the relink all functions and that temporary file exisits in the project directory instead.

Paul.

Thank you Paul.
Vista can really be a pain in the a**.
Title: Re: Not compiling
Post by: Barney on May 24, 2008, 11:20:36 AM
Been using Vista for quite some years now. Never had any real problems. One thing I always did, I disabled UAC (User Account Control) the moment I installed Vista. After that no nags, no annoyances. :)

Barney