![]() |
WinCRT32 Fehler?!
Hallo zusammen,
im Rahmen des Delphiunterrichts hat uns unser PRof bestimmte uses variablen gegeben: "Win32Crt, SysUtils, Math, UIOTool, UStrTool, UMixTool;" mit denen wir arbeiten... er hat uns auch die dazugehörigen units zu verfügung mit Installationsantleitung gestellt. Ich habe auch alles so durchgeführt, jedoch kommt mir beim compilen immer ein Fehler: "[Fatal Error] Kreisumfang.dpr(5): F2063 Could not compile used unit 'Win32Crt.pas'" Ich habe die Win32CRT.dcu in \lib ordner geschoben, geändert hat sich dadurch leider nichts! Der Prof kann mir nicht weiter helfen... ich hoffe ihr habt Rat für mich, sonst siehts schlecht aus mitm lernen;) Danke Plautzer |
Re: WinCRT32 Fehler?!
Hallo,
programmierst du mit Delphi oder unter TurboPascal? Die Unit Crt gibt es doch imho nur für TurboPascal. :gruebel: |
Re: WinCRT32 Fehler?!
Die Win32Crt ist definitiv für Delphi
und wird in der Regel benutzt wenn eine Consolenapplication entwickelt wird. Zu finden ist die Unit hier -> ![]() Grüße Klaus |
Re: WinCRT32 Fehler?!
Danke... es hat funktioniert.. jedoch sind jetzt wieder neue Fehlermeldungen hinzugekommen.
Wie machen vorwiegend pascal... da ich aber selber mit delphi arbeite, habe ich delphi 2005 drauf. Gibt es da generell etwas zu beachten? Hier ist die Win32Crt die der Prof nutzt... ich habe das mal mit dem alten inhalt, der win32crt.pas ersetzt:
Delphi-Quellcode:
Jedoch ist er nicht wirklich damit zufrieden:
{ A Special version of WinCrt, for use in Win32 only.
Copyright 1996-2001 ZieglerSoft [url]WWW.ZieglerSoft.DK[/url] [email]ZieglerSoft@ZieglerSoft.DK[/email] } Unit Win32Crt; Interface Uses SysUtils,Windows,Messages; Var ScreenBuffer : PChar; WindowOrg : TPoint = (X: cw_UseDefault; Y: cw_UseDefault); WindowSize : TPoint = (X: cw_UseDefault; Y: cw_UseDefault); ScreenSize : TPoint = (X: 80; Y: 25); Cursor : TPoint = (X: 0; Y: 0); Origin : TPoint = (X: 0; Y: 0); AutoTracking : Boolean = True; CheckEOF : Boolean = False; CheckBreak : Boolean = True; ShowScroll : Boolean = True; ScrollScreen : Boolean = True; UseScrollKeys: Boolean = True; CanResize : Boolean = True; CrtWindow : HWnd = 0; WindowTitle : Array[0..79] of Char; InAktivTitle : Array[0..79] of Char; InactiveTitle: PChar='Inactive program: "%s" '; Type Keyset = Set of Char; {Used to tell what keys we would allow in input This is used by SmartInput / ScreenInput} Var AllKeys : KeySet = [#000..#255]; {Allow all keys in input used by SmartInput / ScreenInput} Type InputJobs = Record {Used by ScreenInput in an array where we have one of theese records for each line we want to input} X : Integer; {Where must the input-string start?} Y : Integer; X1: Integer; {Where must the 'Prompt' start?} Y1: Integer; L : Integer; {Length of string we want to edit} S : AnsiString; {The string we want to edit} P : AnsiString; {The 'prompt'} AK: keySet; {Accepted keys in this input. If not set, then all keys can be used} End; Procedure InitWinCrt; Procedure DoneWinCrt; Procedure WriteBuf(Buffer: PChar; Count: Word); Procedure WriteChar(Ch: Char); Function KeyPressed: Boolean; Function ReadKey: Char; Function ReadBuf(Buffer: PChar; Count: Word): Word; Procedure GotoXY(X, Y: Integer); Function WhereX: Integer; Function WhereY: Integer; Procedure ClrScr; Procedure ClrEol; Procedure CursorTo(X, Y: Integer); Procedure ScrollTo(X, Y: Integer); Procedure TrackCursor; Procedure AssignCrt(var F: Text); Procedure Delay(Msec:Word); {A delay-function that waits for at least Msec milliseconds} Procedure TextOutPos(X,Y:Integer;What:String); {prints a string on the screen, at position X,Y, without moving the cursorpoint} Procedure FillScreenChar(X,Y:Integer;Length:Integer;C:Char); {Prints a string of C chars, Length length at position X,Y} Function SmartInput(X,Y:Integer; {Where do we start} Len:Integer; {How long} Var Value:AnsiString; {In- and output} OkKeys : KeySet; {What keys are allowed} TabAdvance:Boolean; {True=tab returns up/down} AutoAdvance:Boolean {True=returns down when len} ):Integer; {0=Enter,-1=esc else key} {This function reads a string from the keyboard, but will return the key used to exit the procedure, as in a normal ReadKey where this is the second char returned (the first was #0) i.e. this is the extended char i.e. for PgUp, PgDn, Up and down. If TabAdvance is true, then a tab-char will return the same char as Down, and Shift+Tab will return the same code as Up. If Autoadvance is true, then if the char just entered was the last that could fit into the string, then the function returns the same code as Down} Function ScreenInput(Var TheJob:Array of InputJobs):boolean; {A function, that can be used to input a complete screen-full of information in one go. You make an array of InputJobs, that is filled with the wanted information, then calls this function to get the data read from the screen. If False, then user exited by pressing ESC, else ENTER} Implementation
Delphi-Quellcode:
[Warning] Win32Crt.pas(13): W1005 Unit 'Borland.Vcl.Windows' is specific to a platform
[Warning] Win32Crt.pas(13): W1005 Unit 'Borland.Vcl.Messages' is specific to a platform [Error] Win32Crt.pas(16): E2397 Unsafe pointer only allowed if compiling with {$UNSAFECODE ON} [Warning] Win32Crt.pas(17): W1012 Constant expression violates subrange bounds [Warning] Win32Crt.pas(17): W1012 Constant expression violates subrange bounds [Warning] Win32Crt.pas(18): W1012 Constant expression violates subrange bounds [Warning] Win32Crt.pas(18): W1012 Constant expression violates subrange bounds [Error] Win32Crt.pas(32): E2397 Unsafe pointer only allowed if compiling with {$UNSAFECODE ON} [Error] Win32Crt.pas(32): E2010 Incompatible types: 'PWideChar' and 'string' [Warning] Win32Crt.pas(35): W1050 WideChar reduced to byte char in set expressions [Error] Win32Crt.pas(59): E2410 Unsafe pointer variables, parameters or consts only allowed in unsafe procedure [Error] Win32Crt.pas(64): E2410 Unsafe pointer variables, parameters or consts only allowed in unsafe procedure [Error] Win32Crt.pas(97): E2029 Declaration expected but end of file found [Error] Win32Crt.pas(56): E2065 Unsatisfied forward or external declaration: 'InitWinCrt' [Error] Win32Crt.pas(57): E2065 Unsatisfied forward or external declaration: 'DoneWinCrt' [Error] Win32Crt.pas(59): E2065 Unsatisfied forward or external declaration: 'WriteBuf' [Error] Win32Crt.pas(60): E2065 Unsatisfied forward or external declaration: 'WriteChar' [Error] Win32Crt.pas(62): E2065 Unsatisfied forward or external declaration: 'KeyPressed' [Error] Win32Crt.pas(63): E2065 Unsatisfied forward or external declaration: 'ReadKey' [Error] Win32Crt.pas(64): E2065 Unsatisfied forward or external declaration: 'ReadBuf' [Error] Win32Crt.pas(66): E2065 Unsatisfied forward or external declaration: 'GotoXY' [Error] Win32Crt.pas(67): E2065 Unsatisfied forward or external declaration: 'WhereX' [Error] Win32Crt.pas(68): E2065 Unsatisfied forward or external declaration: 'WhereY' [Error] Win32Crt.pas(69): E2065 Unsatisfied forward or external declaration: 'ClrScr' [Error] Win32Crt.pas(70): E2065 Unsatisfied forward or external declaration: 'ClrEol' [Error] Win32Crt.pas(73): E2065 Unsatisfied forward or external declaration: 'CursorTo' [Error] Win32Crt.pas(74): E2065 Unsatisfied forward or external declaration: 'ScrollTo' [Error] Win32Crt.pas(75): E2065 Unsatisfied forward or external declaration: 'TrackCursor' [Error] Win32Crt.pas(77): E2065 Unsatisfied forward or external declaration: 'AssignCrt' [Error] Win32Crt.pas(79): E2065 Unsatisfied forward or external declaration: 'Delay' [Error] Win32Crt.pas(82): E2065 Unsatisfied forward or external declaration: 'TextOutPos' [Error] Win32Crt.pas(85): E2065 Unsatisfied forward or external declaration: 'FillScreenChar' [Error] Win32Crt.pas(94): E2065 Unsatisfied forward or external declaration: 'SmartInput' [Fatal Error] Template.dpr(12): F2063 Could not compile used unit 'Win32Crt.pas' |
Re: WinCRT32 Fehler?!
Sagen mir nicht wirklich viel, diese Fehlermeldungen.
Aber wenn Du Pascalprogramme in Delphi 2005 schreibst, mußt Du diese Programme als Console Applikation erstellen. Im Projekt sollte dann das stehen:
Delphi-Quellcode:
Grüße
program Project2;
{$APPTYPE CONSOLE} uses SysUtils,Win32Crt; begin { TODO -oUser -cConsole Main : Insert code here } end. Klaus |
Re: WinCRT32 Fehler?!
Ich habe schon ein geschriebenes Programm, dass ich öffenen und ausführen möchte... ich nehme an, das es automatishc in der Konsole gestartet wird.
Der Prof hat uns ein WIN32CRT.dcu gegeben die wir einfügen sollen... kann ich diese irgendwie in die win32crt.pas umwandeln? |
Re: WinCRT32 Fehler?!
Zitat:
Hast du schon versucht die Datei in dein Projektverzeichnis zu kopieren? |
Re: WinCRT32 Fehler?!
Zitat:
Die dcu, welche Du bekommen hast, für welche Delphi Version ist die denn? Wenn Ihr in der Schule eine andere Delphiversion nutzt als Du zuhause, wird unter Umständen die dcu nicht geladen werden. Grüße Klaus |
Re: WinCRT32 Fehler?!
Öhm, Dein Quote der PAS-Datei endet mit der Zeile
Delphi-Quellcode:
... Ist das wirklich das Ende des Files? Dann wundert mich die Fehlermeldung
Implementation
Zitat:
|
Re: WinCRT32 Fehler?!
[quote="OldGrumpy"] Ist das wirklich das Ende des Files?/quote]
Ich hatte erst gedacht, das es die komplette datei sei, jedoch handelt es sich lediglich um eine halbertige dokumentation! Ich arbeite mit Delphi 2005 pro und die programme, die ich abspielen möchte sind mit turbodelphi geschrieben. Die enthalten vom lehrer speziefische tools. |
Re: WinCRT32 Fehler?!
Liste der Anhänge anzeigen (Anzahl: 1)
Ich habe dir mal die verschieden Versionen von Win32Crt angehängt.
Vielleicht versuchst Du es einmal mit der zu Deiner DelphiVersion passenden Win32Crt.dcu. TurboDelphis dcu's sollten zu Delphi2006 kompatibel sein, wie sie sich zu Delphi2005 verhalten weiß ich nicht. Grüße Klaus |
Re: WinCRT32 Fehler?!
Irgendwie willst das überhaupt nicht klappen.
Ich zeige nochmal auf was ich alles gemacht habe bzw. wo ich welche datei vom prof hinkopiert habe, vielleicht ist mir ja ein fehler unterlaufen. delphi32.dci -> nach BIN Win32CRT.dcu -> nach LIB TurboDelphiUnits -> nach borland/3.0 In der Turobdelphi sind folgende dateien: UStrTool.pas, UIOTool.pas, UMixTool.pas; |
Re: WinCRT32 Fehler?!
Turbodelphi = delphi 2006 <> Delphi 2005
Wenn die WinCRT322.dcu für TurboDelphi ist, kann sie nicht unter Delphi2005 benutzt werden! Wenn du keine Fremdkomponenten brauchst, hole dir die Explorer-Version von den Turbos und mach das ganze darunter. Gruß Jörg |
Re: WinCRT32 Fehler?!
Zitat:
Bei start kommt jedoch immer die Fehlermeldung, das Delphi .Net nicht lizensiert ist und ich es so nicht komplett nutzen kann? Weiß jemand woran das liegt? Ich habe windows xp home. |
Re: WinCRT32 Fehler?!
Zitat:
|
Re: WinCRT32 Fehler?!
Zitat:
|
Re: WinCRT32 Fehler?!
Zitat:
Bei start kommt jedoch immer die Fehlermeldung, das Delphi .Net nicht lizensiert ist und ich es so nicht komplett nutzen kann? Weiß jemand woran das liegt? Ich habe windows xp home. |
Re: WinCRT32 Fehler?!
Entweder du hast nicht gelesen was inzwischen gopostet wurde oder du willst es nicht lesen.....
|
Re: WinCRT32 Fehler?!
Zitat:
|
Re: WinCRT32 Fehler?!
Zitat:
Danke! |
Re: WinCRT32 Fehler?!
Grüß Euch.
Ich hab ein ähnliches Problem wie am Anfang beschrieben. Ich hab jetzt seid 2 Tagen Delphi auf dem Rechner (und beginn damit meine Programiererfahrungen... also nicht gleich köpfen, ich hab nich wirklich viel Ahnung). Ich programmier ein paar Sachen aus den Studie-unterlagen von nem Bekannten nach. Leider fehlen mir ein paar "Klassen". U.a. Win32Crt Auf dem Rechner hab ich TurboDelphi. (Wenn ihr nach Version fragt müsst ich raten.. ist unter nem Ordner gespeichert der 4.0 heißt... ^^# Hab sie jedenfalls vor 2 Tagen bei Borland runtergeladen, also wirds wohl ziemlich neu sein. XD) Ich hab hier dann mal nach win32crt gesucht und mir das auch runter geladen. Win32crt.dcu in den lib Ordner eingefügt und seid dem krig ich auch die Fehlermeldung: [Pascal Fataler Fehler] TextAus.dpr(11): F2063 Verwendete Unit 'Win32Crt.pas' kann nicht compiliert werden Muss ich noch irgendwas irgendwo einfügen? Sry, ich hab da wirklich nicht viel Ahnung von und weis auch nicht wo ich die Infos für her krig außer hier. Wär echt super wenn ihr mir weiter helfen könntet. Ganz lieben Gruß Yuki ^^# Ah ja.. falls das iwem hier bei meiner Frage nutzt... XD Das hier ist mein Quelltext bisher (fehlen noch n paar "USES", ich weis, aber die Klassen hab ich nicht auf dem Rechner, such ich mir raus sobald ich das mit der hier geschafft hab XD): program TextAus; (* Dieses kleine Programm schreibt einen Satz auf die Standart-Ausgabe-Datei "Output". *) (* -------------------------------------------------------------------*) {$APPTYPE CONSOLE} uses SysUtils, Win32Crt; const FensterTitel = 'TextAus'; x0 = 0; y0 = 20; // obere linke Fensterecke xd = 670; yd = 420; // untere rechte Fensterecke (* --------------------------------------------------------------------*) begin Open_CrtWindow (FensterTitel, x0, y0, xd, yd); Write ('Dies hier'); WriteLn ('ist unser zweites'); WriteLn ('Pascal-Programm.'); WriteLn; WriteLn ('Es zeigt die Wirkung der Befehle'); WriteLn ('''Write'' und ''WriteLn''.'); WriteLn; Close_CrtWindow; end. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:35 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz