How to create Visual Studio solution using GTK+?

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.
annebruner
In need of some credit
In need of some credit
Posts: 2
Joined: Thu Dec 21, 2017 4:54 pm

How to create Visual Studio solution using GTK+?

Postby annebruner » Thu Dec 21, 2017 6:25 pm

I am trying to follow instructions under docs/msw/gtk.txt to create a Visual Studio solution that includes the GTK+ configurations.

I downloaded and unzipped wxWidgets-3.0.3.zip and gtk+-bundle_3.6.4-20130513_win64.zip. I modified the config.bkl file as specified, removed all files in build/msw and executed bakefile_gen. I am able to open and successfully upgrade the created wx_vc9.sln solution file (I am using VS 2015) I see the GTK build configurations and selected GTK+ debug. Three projects failed to compile (core, adv and aui) and I modified them to include the GTK directories. I also had to manually copy the wx/gtk/setup.h to lib/vc_lib/gtk2ud/wx as the Custom Build Tools aren't configured for the GTK+ debug build configuration. Also I uncommented the #define __WXGTK3__ line in that file since I am using GTK3. Now I am stuck with this error when compiling aui:
1>..\..\src\aui\tabartgtk.cpp(70): error C2065: 'wxGTKDCImpl': undeclared identifier

It looks like there are some source and header files in src/gtk that need to be included. Am I missing a configuration step when creating the solution files for Visual Studio? I have not used bakefiles before so any suggestions would be most appreciated!

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

Re: How to create Visual Studio solution using GTK+?

Postby ONEEYEMAN » Thu Dec 21, 2017 6:37 pm

Hi,
Unfortunately the GTK build under MSW is not properly maintained.
There was an effort from one person to bring this up and running, but I think he just abandon that idea.

Nevertheless this should be working just fine.
You are better off sending an E-mail to the wx-dev ML indicating what steps you took to create a successful solution and where you are stuck (the error you received). Then either the original author (Kolya Kosenko) or Vadim (generic wx maintainer) will be able to help you.

But out of curiosity - what is the purpose of building wxGTK under Windows?

Thank you.

coderrc
Earned some good credits
Earned some good credits
Posts: 141
Joined: Tue Nov 01, 2016 2:46 pm

Re: How to create Visual Studio solution using GTK+?

Postby coderrc » Thu Dec 21, 2017 6:46 pm

Assuming your goal is to make a linux app, my preference is to use the Visual C++ for linux plugin and a linux vm.

this way I can work in visual studio and build/test on a linux machine.

annebruner
In need of some credit
In need of some credit
Posts: 2
Joined: Thu Dec 21, 2017 4:54 pm

Re: How to create Visual Studio solution using GTK+?

Postby annebruner » Thu Dec 21, 2017 6:54 pm

Thanks for the replies. My end goal is to create an embedded Linux application that will be running on a BeagleBone. I do most of my development on Windows using Visual Studio (I am more productive that way!). I am thinking at this point to use GTK on the BeagleBone so was wanting my development environment on Windows to match as closely as possible.

When creating Visual Studio projects and solution files using bakefile_gen, do you happen to know if I should somehow be setting the TOOLKIT to GTK and if so - how to do that?

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

Re: How to create Visual Studio solution using GTK+?

Postby ONEEYEMAN » Thu Dec 21, 2017 9:58 pm

Hi,
Unfortunately I have no idea.
But like I said - just send an e-mail to the ML (wx-dev) and either Vadim or Kolya will try to help.

OTOH, Kolya did start that port to simplify the debugging effort on Linux where only gdb is available and no good graphical environment.
If you can install some kind of VM with VirtualBox (Ubuntu, Debian or whatever is available on your board) and compile wx + your application and then install CodeBlocks CodeLite or Anjuta you will have a nice IDE to work with.

I know that in Anjuta you can do debugging without any problems and this IDE does have a template for creating the wx application. Also, VirtualBox and the Linux downloads are free. You just need to grab one that your board uses.

Thank you.

stahta01
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 230
Joined: Fri Nov 03, 2006 2:00 pm

Re: How to create Visual Studio solution using GTK+?

Postby stahta01 » Thu Dec 21, 2017 11:11 pm

The last time I worked on wxGTK/Win32 I only was able to get gtk2 to work.
I have not tried in the past few months to see if gtk3 works, now.

This was using MinGW64 GCC instead of Visual Studio.
And, I did it under MSys2 (an fork of Cygwin).

Tim S.

stahta01
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 230
Joined: Fri Nov 03, 2006 2:00 pm

Re: How to create Visual Studio solution using GTK+?

Postby stahta01 » Thu Dec 21, 2017 11:24 pm

You need to change TOOLKIT_VERSION to 3 instead of 2 if you wish to use GTK3.

I would guess you need to change it in "config.bkl"; but, I could be wrong.

Edit: After finding where to set TOOLKIT_VERSION, I would guess you need to rebake the files.

Edit2: The file tabartgtk.cpp is only needed when using GTK2 according to one of the bkl files.

Code: Select all

..\..\src\aui\tabartgtk.cpp(70): error C2065: 'wxGTKDCImpl': undeclared identifier


Tim S.


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: No registered users and 4 guests