Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VS Code and Qb64 pe
#1
I need some pointers/info on how to get it to actually compile a loaded project please....anyone got any ideas?

John


Code: (Select All)
qb64pe.exe : The term 'qb64pe.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path 
was included, verify that the path is correct and try again.
At line:1 char:1
+ qb64pe.exe -x 'C:\QB64\UnseenGDK_Dev\Projects\Cloth Simulation.bas' - ...
+ ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (qb64pe.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
Reply
#2
Try:

./qb64pe.exe -x

Don't forget the ./
Reply
#3
Forgive my ignorance, but where should i put that?
Reply
#4
If you're using VS Code with QB64-PE, you might find the QB64-PE extension (https://open-vsx.org/extension/grymmjack/qb64pe) by @grymmjack helpful. Just thought I'd mention it since your topic title says, "VS Code and Qb64 pe".
Reply
#5
Reply
#6
More extensive help here too:
https://github.com/grymmjack/vscode-prof.../README.md
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply
#7
If you just want a light weight setup with no extension use this:

Create a .vscode directory in your workspace.
Create a tasks.json file within .vscode directory in the workspace.

Change this below:
Code: (Select All)
${config:qb64pe.compilerPath}

To the path where your QB64pe binary is, e.g.

Code: (Select All)
C:\QB64pe\qb64pe.exe

That's it, then hit CTRL-B and it will compile and show a little terminal window. Here you can see the warnings, etc.

Tasks are under Terminal menu -- Terminal -> Run Task... then you pick what you want. Because we configured this as a BUILD task, it will work with CTRL-B by default.

[Image: SCR-20250903-plyv.png]

I HIGHLY RECOMMEND the extension, but wanted to give you the simplest instructions possible to get you going.

If you want colors like QB64PE IDE the Dark theme in my theme extension is an option for you:
https://open-vsx.org/extension/grymmjack/qb64pe-theme

To use it install the vsix file you downloaded, then click the gear icon in bottom left, then Themes, color theme - or press CTRL-K CTRL-T then pick it.

Good luck!

.vscode/tasks.json
Code: (Select All)
{
  "tasks": [
    {
        "label": "EXECUTE: Run",
        "dependsOn": "BUILD: Compile",
        "type": "shell",
        "windows": {
            "command": "${fileDirname}\\${fileBasenameNoExtension}.exe",
        },
        "osx": {
            "command": "${fileDirname}/${fileBasenameNoExtension}.run",
        },
        "linux": {
            "command": "${fileDirname}/${fileBasenameNoExtension}.run",
        },
        "presentation": {
            "echo": false,
            "reveal": "always",
            "focus": false,
            "panel": "shared",
            "showReuseMessage": false,
            "clear": false
        },
        "group": {
            "kind": "build",
            "isDefault": true
        }
    },
    {
        "label": "BUILD: Compile",
        "dependsOn": "BUILD: Remove",
        "type": "shell",
        "windows": {
            "command": "${config:qb64pe.compilerPath}",
            "args": [
                "-w",
                "-x",
                "-f:MaxCompilerProcesses=8",
                "${fileDirname}\\${fileBasename}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ]
        },
        "osx": {
            "command": "${config:qb64pe.compilerPath}",
            "args": [
                "-w",
                "-x",
                "${fileDirname}/${fileBasename}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}.run"
            ]
        },
        "linux": {
            "command": "${config:qb64pe.compilerPath}",
            "args": [
                "-w",
                "-x",
                "${fileDirname}/${fileBasename}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}.run"
            ]
        },
        "presentation": {
            "reveal": "always",
            "clear": true,
            "panel": "shared",
            "focus": false
        }
    },
    {
        "label": "BUILD: Remove",
        "type": "shell",
        "windows": {
            "command": "del",
            "args": [
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ]
        },
        "osx": {
            "command": "rm",
            "args": [
                "-f",
                "${fileDirname}/${fileBasenameNoExtension}.run"
            ]
        },
        "linux": {
            "command": "rm",
            "args": [
                "-f",
                "${fileDirname}/${fileBasenameNoExtension}.run"
            ]
        },
        "presentation": {
            "reveal": "always",
            "panel": "shared",
            "focus": false
        }
  ]
}
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  has anyone had ChatGPT write QB64 code yet? madscijr 13 2,905 08-23-2025, 09:15 AM
Last Post: doppler
  liquid code experiment madscijr 3 473 06-20-2025, 07:26 PM
Last Post: madscijr
  [split] Lines of Code bplus 20 2,938 01-25-2025, 05:11 PM
Last Post: Pete
  QB64 GPT Just Rewrote My Code SpriggsySpriggs 17 2,764 05-30-2024, 06:50 PM
Last Post: madscijr
  AI does a good job of analyzing code SpriggsySpriggs 5 1,090 04-26-2024, 02:29 AM
Last Post: Pete

Forum Jump:


Users browsing this thread: 2 Guest(s)