Re: compile glib success but failure on run-time with every version



Thank you Chun-wei for your reply! and also thank you for all of your contribution to Visual Studio solutions to compile GTK+, my solutions are largerly based on yours, in fact I copied yours and modifed them for my intentions and also created some myself to make possible to compile everything by using MSVC only.
I will defintelly add more credit to you and other people into readme files once I complete all this mess.

Ok... now back to problem...
I added the preprocessor flag as you said and was not able to compile test program, however I tried to add following flags instead:
_CONSOLE
GLIB_COMPILATION
G_LOG_DOMAIN="GLib"
G_ENABLE_DEBUG

after doing so test program suceded! :D

I'm not sure how will this affect my GTK+ compilation, because both gtk-demo and gtk-demo-application results in crash, I'm looking right now at gtk-demo preprocessor flags and what is defined there is following:
GTK_PREFIX=\"$(GtkDummyPrefix)\" where GtkDummyPrefix is "/dummy"

Do you know what could be the cause of gtk-demo crash? every singe test program of every single dependency package is success now except gtk-demo-application and gtk-demo.

the GTK+ version I'm compiling right now is 3.14.8, do you think I should try older versions? because there are "unhandled exceptions" while trying to debug gtk-demo.

Thank you so much!

On Thu, Feb 12, 2015 at 2:09 PM, Fan Chun-wei <fanc999 yahoo com tw> wrote:
Hi,

For the test programs, you can take a look at Makefile.am in the same directory, and you would probably see something like -DG_LOG_DOMAIN=\"...\", and this is (without the -D) what you need to add to your preprocessor definitions. Basically, what is happening is that the test program is expecting a message in a particular form that is affected by that preprocessor define.

Hope this clears it up for you.

With blessings.


From: codekiddy <codekiddy gmail com>;
To: <gtk-list gnome org>;
Subject: compile glib success but failure on run-time with every version
Sent: Thu, Feb 12, 2015 12:39:32 PM

Hello, I'm working on series of Visual Studio 2013 solutions and projects on GitHub to compile GTK+ stack and it's dependencies from scratch, beginning with zlib and iconv up to GTK+ and even gtkmm. So far I succeeded to compile everything by using msvc-120 and other tools and here is a problem with glib:

I run test projects of every successful package compilation by using "test" source files from each package, and it's the glib only that fails, the glib test that fails whose source code is found in <package_root>\tests\testglib.c triggers a breakpoint. The very same error happens when running gtk-demo application, the application crashes so
I compiled several versions of glib and re-linked the GTK and it's dependencies with new glib but with no success. glib test can not pass.

I'm not sure how to describe my problem but here is the result while debugging testglib.c test:

(testglib.exe:2492): GLib-CRITICAL **: Did not see expected message **-CRITICAL **: *g_print*assertion*failed*

(testglib.exe:2492): GLib-CRITICAL **: g_print: assertion 'format != NULL' failed

Here are versions of glib sources that I compiled:
2.34.3
2.39.92
2.40.2
2.42.1

all of the above packages get successfully compiled including all dpendencies, but running testglib.c results in same error and thus preventing me to finaly run gtk-demo application resulting in crash.

I was able to compile GTK+ and all it's dependencies by using Windows SDK 7.1 and msvc-100 some time ago so I'm installing the msvc-100 toolset right now and will try to compile with that and see if this makes any change.
Also all of my tools, (SDK, IDE, and sources) are located in path with no spaces) as suggested in README file of glib and other packages.

Do you know what could be the cause of this? and what can I do to solve this problem? please let me know if you need more information..
Thank you so much!



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