1

I am using Visual Studio 2022. I would like to build a project using BJFX. It is my first BGFX project but I have some issues in the first stage.

I have this error message in the console #error "BX_CONFIG_DEBUG must be defined in build script!".

What is the build script? How can I define this so call BX_CONFIG_DEBUG script or whatever that is? To be fair, I don't even understang the issue, except that something isn't properly defined.

Does anyone know the issue and how to fix it?

At first, I thought it was an issue occurring from the installation of Visual Studio. I tried re-installing Visual Studio but it didn't work. I have looked for a solution on many forums and Youtube but nothing worked for me.

Smith14
  • 13
  • 4
  • I'm guessing you need to add `BX_CONFIG_DEBUG` to your solutions preprocessor. `Configuration Properties->C/C++->Preprocessor->Preprocessor Definitions` – user20716902 Feb 10 '23 at 23:02
  • @user20716902 It seems it worked. I now have another issue but that one is fixed. Thank you a lot for your time and the solution. – Smith14 Feb 10 '23 at 23:23

2 Answers2

0

The messaage you are seeing is being emmited by the BGFX headers telling you that you need to define BG_CONFIG_DEBUG. By Build Script this means however you build your code (In this case using VS2022).

I'm going to presume that you're using the GUI.

In the Solution Explorer, right click your app name and select Properties

Now open Configuration Properties->C/C++->Preprocessor:

Here you will find Preprocessor definitions add BX_CONFIG_DEBUG (each value seperated by the ; symbol.

Save settings. Thats it.

user20716902
  • 861
  • 1
  • 14
0

Add preprocessor define BX_CONFIG_DEBUG=1 for debug builds.
Add preprocessor define BX_CONFIG_DEBUG=0 for release builds.

avariant
  • 2,234
  • 5
  • 25
  • 33
pF1Tz
  • 1
  • 2