Setting up a base project Topic is solved

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
beneficii
Earned some good credits
Earned some good credits
Posts: 111
Joined: Fri Nov 27, 2009 2:49 am

Setting up a base project

Post by beneficii »

I'm using Visual Studio 2017, and it seems that every time I have to set up using wxWidgets, I need to create a template by adding all these include directories for each and every configuration, all these library names, and library paths for each and every configuration. It's a time consuming process, and I need to do it for every new build and new computer, because the exact directory names will differ.

There's the minimal sample, but creating a template from that also doesn't work very well. I have to do the same thing, because all the directory paths in minimal are relative. I have to make them absolute.

Is there a more straightforward a way to get set up writing my own projects? What is the exact process you guys use?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Setting up a base project

Post by ONEEYEMAN »

Hi,
Which version of wxWidgets do you use?

Thank you.
New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 469
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: Setting up a base project

Post by New Pagodi »

If your using 3.1.2, there's a props file in the root folder you can use. It's described in this blog post.
beneficii
Earned some good credits
Earned some good credits
Posts: 111
Joined: Fri Nov 27, 2009 2:49 am

Re: Setting up a base project

Post by beneficii »

Thanks! It seems to largely work, but there is an issue.

There is one error in the property sheet, which causes an error. It tries to find setup.h in "(wxwidgets_dir)/lib/vc_lib/mswd/wx" (emphasis added), but the correct directory name is mswud.

What should I do?
New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 469
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: Setting up a base project

Post by New Pagodi »

I guess I should have mentioned that I haven't actually used it myself. But looking over the files, it looks like if you set the CharacterSet to Unicode in your project, it should trigger using the right folder name.
beneficii
Earned some good credits
Earned some good credits
Posts: 111
Joined: Fri Nov 27, 2009 2:49 am

Re: Setting up a base project

Post by beneficii »

How would I do that? Do they mean the character encoding for the source file? I tried setting it to UTF-8. It's still trying to look for mswd, which doesn't exist.

Does CharacterSet refer to something else?

EDIT: OK. I fixed it. It's the character set for the project. I set it to Unicode and now it compiled and linked like it should! Thank you so much!

This property sheet thing is really helpful, but it might be good to make it explicit that for Unicode builds of wxWidgets, you should make sure to set the project's character set to Unicode.
Post Reply