path included by Visual Studio 2019

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
vjedlicka
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sat Aug 10, 2019 11:55 am

path included by Visual Studio 2019

Post by vjedlicka » Fri Dec 20, 2019 4:16 pm

I installed wxWidgets the recommended way. I created the system variable WXWIN pointing to the wxWidgets folder.

When I right click a project and select "Add" - "Class", and fill in all fields, VS generates the files and in the .h file it generates this line:

Code: Select all

#include "D:\wxWidgets-3.1.2\include\wx\docview.h"
instead of the correct:

Code: Select all

#include "wx\docview.h"
What is wrong?
Vaclav

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4357
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: path included by Visual Studio 2019

Post by ONEEYEMAN » Fri Dec 20, 2019 7:27 pm

Hi,
What is the recommended way? There are multiple...
2. What version of MSVC do you use?

I'm using MSVC 2017 Community and for me the "Class Wizard" doesn't work at all. I just add some files to the project.

Thank you.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2511
Joined: Sun Jan 03, 2010 5:45 pm

Re: path included by Visual Studio 2019

Post by PB » Fri Dec 20, 2019 8:03 pm

What is wrong is that MSVS has no idea about wxWidgets classes (how they are implemented for various platforms) and when using the generic add class template (as opposed to an MFC, ATL etc. one) it tries to guess the file where the base class resides. I tried a couple of classes and it always guessed wrong for wxDialog and wxFrame, using a platform-specific header file (GTK, univ...) instead of the proper one.

I assume you just have to live with it and correct the generated include path.

vjedlicka
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sat Aug 10, 2019 11:55 am

Re: path included by Visual Studio 2019

Post by vjedlicka » Fri Dec 27, 2019 5:24 pm

I followed setup instructions from this video:
https://youtu.be/FOIbK4bJKS8

Anyway, looks like I will have to live with that.

Thanks
Vaclav

Post Reply