Re: Getting a GTK3 program to compile on Visual Studio 2012

Hello fr33domlover,

On 01/08/2014 08:48 PM, fr33domlover wrote:
I've been trying to port my GTK2 program to GTK3, but I've ran into a
Visual Studio 2012, which handles GTK2 just fine, claims some glib header
files have syntax errors.

Your error is very similar to my error when I tried to port wxGTK/Win32 from GTK+ 2 to GTK+ 3 using Visual C++.

I noted that Codeblocks&MinGW compile the same code under the same
configuration just fine and do not report any problems with GTK3 header

Interesting, I didn't try to compile wxGTK3/Win32 with MinGW yet.

Here's a link to the compilation errors I get when trying to compile a
basic gtk3 program with VS2012:

Compare your first compilation error:
Error 1 error C2143: syntax error : missing '{' before 'const' c:\example-gtk3-vs2012-project-master\include\glib\gutils.h 122 1 gtk3test

My first compilation error:
1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(128) : error C2143:
syntax error : missing '{' before 'const'

Any help will be greatly appreciated!

I think that it is a bug in GTK+3/Win32 API. As workaround you could try to compile your C files as C++ files:

It would be nice to know what Tarnyko think about these errors.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]