Smith14
Smith14

Reputation: 13

#error "BX_CONFIG_DEBUG must be defined in build script!" on Visual Studio, BGFX

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.

Upvotes: 1

Views: 785

Answers (2)

pF1Tz
pF1Tz

Reputation: 1

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

Upvotes: 0

user20716902
user20716902

Reputation: 1393

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.

Upvotes: 0

Related Questions