Running CodeBlocks Project

  • 2 Replies
Running CodeBlocks Project
« on: May 10, 2023, 05:35:34 PM »
Hello - this is a follow up to my previous post "Compiler errors involving Python"

After successfully compiling steps 1 and 2 fully using MSYS2, I loaded the CBP file into CodeBlocks. After building the full project and running the target "ScopeFun," I encounter an error - I've attached an image of it. It states:

Code: [Select]
message: settings.json error before:[(null)]

file: C:\msys64\home\jared\scopefun-software\source\scopefun\osc\oscsettings.cpp
function: load
line: 831

I've checked this line in the oscsettings.cpp file and I see that it calls settings.json from "data/startup/settings.json"
I verified the location of this json file and it appears to exist, so I'm not sure why it appears as null in this error. I tried hard coding the path of the settings.json in oscsettings.cpp, but experienced the same error.

How should I go about troubleshooting this? Help is appreciated.



  • *****
  • 137
    • View Profile
Re: Running CodeBlocks Project
« Reply #1 on: May 11, 2023, 09:20:54 AM »

You need to change the running directory for the ScopeFun target in codeblocks.

Go to Project -> Properties, select Build targets tab and in this tab search for ScopeFun Build target on the left. Then change the following entries for this target:
- Ouput filename: ..\bin\scopefun.exe (if release binary)
- Execution working dir: ..\bin

Re: Running CodeBlocks Project
« Reply #2 on: May 11, 2023, 08:37:59 PM »
Thank you! That seemed to work for me with the Release build.