I have been using Lazarus & ObjPascal/Delphi for a while now and this is by far the most confusing problem I have had... I have been making a simple application to teach my friend (Who is new to ObjPascal) the basics, and it seems that I myself am having issues with the basics... He has compiles & run the same code as I am and it works fine for him, which raises the question, what's gone wrong? This code has worked fine for me in the past and is only a simple 'Hello World' application, running the following:
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes
{ you can add units after this };
{$R *.res}
begin
Writeln('Hi');
Readln();
end.
Throws up no debug messages but a run-time message that says the following:
"Project project1.exe raised exception class 'RunError(103)'."
The IDE then points to this line:
Writeln('Hi');
and Upon hovering over the line gives this message:
"Writeln = No Symbol \"Writeln\" in current context."
If I then try and run the .EXE I get the following Error:
"An unhandled exception occurred at $0040151B :
EInOutError : File not open
$0050151B Line 15 of project1.lpr"
I am utterly baffled. as my friend can run the code with no problems and yet my IDE will run other applications fine, but refuses to run newly created console applications...
Lazarus Info:
- Version: 0.9.30
- Date: 2011-03-08
- FCP Version: 2.4.2
- SVN Revision: 29749
- i386-win32-win32/win64
Any help would be greatly appreciated and if any of my spelling or grammar is incorrect please exuse - it is early hours of the morning and i'm kinda frustrated with this! xD
Thanks.
Logic~