Skip to content

C Backend not compiling. #1

Open

Description

@agorangetek

I set the path to my pbcompilerc.exe but it does not work.

Compiling: audioengine.pb
  C:\Program Files\PureBasic\Compilers\pbcompilerc.exe c:\Users\agora\OneDrive\Bootleg\Purebasic\audioengine.pb --exe c:\Users\agora\OneDrive\Bootleg\Purebasic\audioengine.exe --run

--exe: Unknown switch

❌ Compilation failed (exit code 1)

Activity

  1. DNSGeek commented on Sep 30, 2026

    @DNSGeek
    Owner

    @claude fix this issue

  2. claude commented on Sep 30, 2026

    @claude

    Claude finished @DNSGeek's task in 50s —— View job • claude/issue-1-20260930-0310 • Create PR ➔


    Fix for the compiler command line

    • Find the code that builds the compiler command line
    • Fix how the arguments are built on Windows
    • Commit and push
    • Build/type-check. Not done: I didn't have permission to run npm install or tsc here, so the change hasn't been compiled or tested.

    Cause: src/compilerService.ts always passed --exe <file> and --run. PureBasic's compiler has neither switch. The Windows compilers (pbcompiler.exe and pbcompilerc.exe) use /EXE, and Linux/macOS use --executable. --run doesn't exist on any platform.

    Changes (src/compilerService.ts):

    • The output switch now depends on the platform: /EXE on Windows, --executable on Linux/macOS.
    • --run is removed. For "Compile & Run", the extension now starts the built executable itself once compilation succeeds. The program's stdout/stderr and exit code are shown in the PureBasic output channel.
    • Auto-detection now also looks for pbcompilerc.exe (the C backend) in the standard Windows install folders.

    The switch names come from PureBasic's documented command-line options, not from a test run. Please try Compile & Run on Windows with pbcompilerc.exe before merging.

    • Branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions