[dev-cpp] Punkte und Linien per C++ in eine W32-Konsole zeichnen?
-
Hallo!
Ich möchte eine W32-Konsolenanwendung dazu bringen, eine Wertetabelle grafisch dazustellen.
Nu hab ich aber wirklich keinen Plan, wo ich da anfangen soll.
Mit welcher Bibliothek kann man denn etwas in die Konsole zeichenen?
Ein Punkt, oder eine Linie von a nach b, ganz popelig für den Anfang, denn wenn ich google durchsuche find ich immer gleich irgendwelche DirectX-Scherze, aber es muß doch da auch für den Anfang was einfacheres geben... so wie TurtleGrafik bei Pascal damals
Danke für jeden Hilfe!
P.S.: Achso ich arbeite mit Dev-C++ und dem Mingw-Compiler, falls das eine Rolle spielt.
-
Jup du willst auf Pixelgrafik hinaus -> Grafikforum.
Aber such mal im Internet nach Allegro - eine Grafiklib in C für Win32-Konsole. Die wohl beste die es für solche Zwecke gibt!
~>Grafikforum
MfG SideWinder
-
Hi!
Von Allegro hatte ich auch schon was gelesen, nur fand ich das irgendwie etwas zu mächtig, um einfach nur eine Linie auszugeben.
Gibt's da echt rein gar nichts weniger komplexes?
Wie auch immer, hab ich mich jetzt mal dran gesetzt, und versucht Allegro zu installieren. Leider nur mit mäßigem Erfolg.
Hab' mir die Datei "all403.zip" heruntergeladen und eigentlich alles so gemacht, wie es in der \docs\build\mingw32.txt beschrieben steht.
Erst die "MinGW32-3.0.0-1.exe" nach C:\dev-cpp installiert, dann dev-cpp drüberinstalliert, und zum Schluß dieses DirectX7-Packet nach C:\dev-cpp extrahiert.
Dann hab ich im WinXP unter System->Erweitert->Umgebungsvariablen->Pfad "c:\dev-cpp\bin" eingetragen und meine autoexec.bat mit "MINGDIR=c:\dev-cpp" erweitert und neu gestartet.
Nun glaub ich aber haben die vergessen zu erwähnen wie genau man Allegro denn nun installiert!?
Now we're ready to make the Allegro library.
make
If your copy of Allegro does not include the linker .def file (unlikely,
unless you have run "make veryclean" at some point, or are using the CVS
version of Allegro), you can regenerate it by running "misc\fixdll.bat".
You will need to have GNU sed and sort installed for this operation to
work. The version of sed that is linked from the MingW32 site does not
work properly; it has issues with end-of-line characters. You should get
sed and sort from the link at the top of this document.Once the build is finished you can recover some disk space by running
"make compress", which uses the UPX program to compress the executable
files and the optimized dll. Before running "make compress", you must set
the environment variable UPX_BIN to point to upx.exe. You will have to
do run "make compress" before "make install" if you want the compressed
dll to be copied to the windows directory. To recover even more disk
space, you can run "make clean" to get rid of all the temporary files and
HTML format documentation.And then the last thing; Installing the Allegro library.
make install
You have now installed MingW32 and allegro! See the rest of the
documentation and examples to learn more about it.Ich hab die .def-Files, nur was bitte soll ich unter "make" und "make install" verstehen?
Einfach die Allegro-Includes in das \includes-Verzeichnis vom dev-cpp oder mingw verschieben geht nicht, weil der Compiler dann sagt, er könnte die allegro.h nicht finden
Was jetzt?
-
@murphy
Du musst "make install" ausführen in der Konsole.
-
Hab ich probiert, aber die Konsole sagt "'make' ist falsch geschrieben oder keine Anwendung".
Und ich hab wirklich keine Anwendung die make heißt
-
@murphy
Die kannst du dir runterziehen (weiß leider nicht mehr genau die Seite) vom Netz freeware versteht sich ;). Musste ich auch machen, weil der make von Borland 5.5 nicht richtig funktioniert hat (stand auch in der Beschreibung von allegro). Gib einfach mal make.exe in google ein, dann dürftest du es finden. Sobald du es hast, probiers nochmal.
-
Welche leichtgewichtigen Alternativen gibt es zu Allegro? Vielleicht etwas in C++? Kann man das z.B. einfach mit wxWindows erledigen (da ist die Installation dank Dev-Paks ein Klacks!)? Wie kann man Anfängern einen solchen Installations-Mist wie oben beschrieben zumuten?
Zur Wertedarstellung ist vielleicht ein kleines WinAPI-Programm das Einfachste?!