0

When building a wxWidgets-3.1.2 project in Visual Studio (both the template from Nuget and the sample from the wxWidgets directory), the compiler generates the following error:

Error C1083 Cannot open include file: '../../../lib/vc_dll/mswud/wx/setup.h': No such file or directory Project1 c:\wxwidgets-3.1.2\include\msvc\wx\setup.h 125

I already built the wxWidgets DLLs in VS so that's not the problem.

I cannot fix this since the file location is in the wxWidgets source code and I don't want to modify that source code. But I really need to compile my project. Please help.

3 Answers 3

1

When building wxWidgets, wxWidgets creates (copies) setup.h in $(WXWIN)\lib\vc_lib\mswud\wx\setup.h with $(WXWIN) the directory where you installed wxWidgets.

You need to add the directory $(WXWIN)\lib\vc_lib\mswud to the Additional Include Directories in Visual Studio.

Sign up to request clarification or add additional context in comments.

1 Comment

Adding the directories manually works, but it is not the recommended approach to build applications using wxWidgets, there is now a better way to do it.
1

You need to configure your application to use wxWidgets correctly. As the installation instructions say:

If you use MSVS 2010 or later IDE for building your project, simply add wxwidgets.props property sheet to (all) your project(s) using wxWidgets.

If you do this, you won't have any problems.

Comments

1

It turns out that I had built the release DLLs but not the debug DLLs. So that was my mistake. After I built the debug DLLs I was able to compile the application.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.