Forum: PC-Programmierung Microsoft Visual Studio Code TDM-GCC Grafik


You were forwarded to this site from EmbDev.net. Back to EmbDev.net
von Martin M. (ats3788)


Lesenswert?

Hallo
Ich wollte das mal ausprobieren
https://www.youtube.com/watch?v=J0_vt-7Ok6U
How to setup graphics.h in VS Code | CodeWar
Was auch soweit ganz gut klappt nur ich verstehe nicht wie der Compiler 
auf das libbgi.a zugreift wo die netten Grafik Befehle in der Digitalen 
"A" Datei vorhanden sind
mein Json sieht folgendermaßen aus.
1
{
2
    "configurations": [
3
        {
4
            "name": "Win32",
5
            "includePath": [
6
                "${workspaceFolder}/**"
7
            ],
8
            "defines": [
9
                "_DEBUG",
10
                "UNICODE",
11
                "_UNICODE"
12
            ],
13
            "windowsSdkVersion": "10.0.19041.0",
14
            "compilerPath": "C:/TDM-GCC-32/bin/g++",
15
            "cStandard": "c17",
16
            "cppStandard": "c++11",
17
            "intelliSenseMode": "windows-gcc-x86",
18
            "compilerArgs": [
19
                "-lbgi",
20
                "-lgdi32\"",
21
                "-lcomdlg32",
22
                "-luuid\"",
23
                "-loleaut32",
24
                "-lole32"
25
            ]
26
        }
27
    ],
28
    "version": 4
29
}

Die Compiler Nachricht
1
[Running] cd "c:\VisualCplusplus\VisualCode\Test2\" && g++ MyGraphTest.cpp -o MyGraphTest && "c:\VisualCplusplus\VisualCode\Test2\"MyGraphTest
2
C:/TDM-GCC-32/bin/../lib/gcc/mingw32/10.3.0/../../../../mingw32/bin/ld.exe: C:\Users\ats37\AppData\Local\Temp\ccTw1KOT.o:MyGraphTest.cpp:(.text+0x2e): undefined reference to `initgraph'
3
C:/TDM-GCC-32/bin/../lib/gcc/mingw32/10.3.0/../../../../mingw32/bin/ld.exe: C:\Users\ats37\AppData\Local\Temp\ccTw1KOT.o:MyGraphTest.cpp:(.text+0x4a): undefined reference to `circle'
4
C:/TDM-GCC-32/bin/../lib/gcc/mingw32/10.3.0/../../../../mingw32/bin/ld.exe: C:\Users\ats37\AppData\Local\Temp\ccTw1KOT.o:MyGraphTest.cpp:(.text+0x6e): undefined reference to `rectangle'
5
C:/TDM-GCC-32/bin/../lib/gcc/mingw32/10.3.0/../../../../mingw32/bin/ld.exe: C:\Users\ats37\AppData\Local\Temp\ccTw1KOT.o:MyGraphTest.cpp:(.text+0x7f): undefined reference to `closegraph'
6
collect2.exe: error: ld returned 1 exit status
7
8
[Done] exited with code=1 in 1.346 seconds*

: Bearbeitet durch User
Beitrag #7409262 wurde vom Autor gelöscht.
von Εrnst B. (ernst)


Lesenswert?

Martin M. schrieb:
> [Running] cd "c:\VisualCplusplus\VisualCode\Test2\" && g++
> MyGraphTest.cpp -o MyGraphTest &&
> "c:\VisualCplusplus\VisualCode\Test2\"MyGraphTest

da ist keine einzige von deinen "compilerArgs" angegeben.
Hast du die in's richtige JSON-File getippt?

Und nein, das YT-Video hab ich nicht geguckt, mach ich auch nicht.

: Bearbeitet durch User
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.