Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
wxSmith run time error "../src/gtk/app.cpp: No such file or directory."
mloutris:
All,
I am running Ubunut 16.04 and have versions of GTK 2 and 3 installed:
--- Code: ---ii libgtk-3-0:amd64 3.18.9-1ubuntu3.3 amd64 GTK+ graphical user interface library
ii libgtk2.0-0:amd64 2.24.30-1ubuntu1.16. amd64 GTK+ graphical user interface library
--- End code ---
UPDATE:
I saw the debugging was quiet and changed it to verbose, and now I see that I am accessing both GTK 2 and 3!
How do I configure this so that I am using only one version for both GTK and wxWidgets?
I've also updated the logging below.
I installed wx as suggested here: http://codelite.org/LiteEditor/WxWidgets31Binaries#toc2
First getting the public key and then creating the local repository:
--- Code: ---sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
sudo apt-add-repository 'deb http://repos.codelite.org/wx3.1.0/ubuntu/ xenial universe'
--- End code ---
I then edited /etc/apt/sources.list to remove the comment indicator, #, at the start of the line.
--- Code: ---sudo apt-get update
sudo apt-get install libwxbase3.1-0-unofficial
--- End code ---
In CodeBlocks, I created a default wxWidgets application selecting wxSmith and compiled.
Compilation is successful with no errors or warnings, but the executable immediately fails.
Running with the debugger, I see that a GTK file is not able to be found.
The project was named 'Graphs' and the entire debug output is below:
--- Code: ---[debug]Starting program: /home/yamex5/mike/langs/cpp/SoloLearn/templates/Graphs/bin/Debug/Graphs
[debug][Thread debugging using libthread_db enabled]
[debug]Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[debug](Graphs:28558): Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
[debug]Program received signal SIGTRAP, Trace/breakpoint trap.
[debug]0x00007ffff45bba5b in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
[debug]>>>>>>cb_gdb:
Program received signal SIGTRAP, Trace/breakpoint trap.
In g_logv () (/lib/x86_64-linux-gnu/libglib-2.0.so.0)
[debug]> bt 30
[debug]#0 0x00007ffff45bba5b in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
[debug]#1 0x00007ffff45bbbcf in g_log () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
[debug]#2 0x00007ffff68d0b7a in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
[debug]#3 0x00007ffff45bfbe7 in g_option_context_parse () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
[debug]#4 0x00007ffff68d0fe8 in gtk_parse_args () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
[debug]#5 0x00007ffff68d1049 in gtk_init_check () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
[debug]#6 0x00007ffff76f151b in wxApp::Initialize (this=0x671460, argc_=@0x7ffff748bd30: 1, argv_=0x657510) at ../src/gtk/app.cpp:364
[debug]#7 0x00007ffff70ee8ba in wxEntryStart (argc=@0x7ffff748bd30: 1, argv=argv@entry=0x657510) at ../src/common/init.cpp:333
[debug]#8 0x00007ffff70eebba in wxInitialize (argc=@0x7ffff748bd30: 1, argv=0x657510) at ../src/common/init.cpp:540
[debug]#9 0x00007ffff70eec0b in wxInitializer::wxInitializer (argv=<optimized out>, argc=<optimized out>, this=<synthetic pointer>) at ../include/wx/init.h:92
[debug]#10 wxEntry (argc=<optimized out>, argv=<optimized out>) at ../src/common/init.cpp:473
[debug]#11 0x000000000040a168 in main (argc=1, argv=0x7fffffffe278) at /home/yamex5/mike/langs/cpp/SoloLearn/templates/Graphs/GraphsApp.cpp:17
[debug]>>>>>>cb_gdb:
[debug]> frame 6
[debug]364 ../src/gtk/app.cpp: No such file or directory.
[debug]#6 0x00007ffff76f151b in wxApp::Initialize (this=0x671460, argc_=@0x7ffff748bd30: 1, argv_=0x657510) at ../src/gtk/app.cpp:364
[debug]>>>>>>cb_gdb:
364 ../src/gtk/app.cpp: No such file or directory.
#6 0x00007ffff76f151b in wxApp::Initialize (this=0x671460, argc_=@0x7ffff748bd30: 1, argv_=0x657510) at ../src/gtk/app.cpp:364
--- End code ---
How does one configure the version of GTK to be used for wxWidgets please?
oBFusCATed:
The source code is not needed for correct operation. But installing it might help with debugging what is going on.
My guess is that you have assertions enabled and you're hitting on. Start the program in terminal and you'll probably see which one it is.
mloutris:
--- Quote from: oBFusCATed on February 19, 2018, 12:05:00 am ---The source code is not needed for correct operation. But installing it might help with debugging what is going on.
My guess is that you have assertions enabled and you're hitting on. Start the program in terminal and you'll probably see which one it is.
--- End quote ---
Thanks for the quick reply!
After enabling more debugging, I see that GTK is trying to use both versions 2 and 3!
--- Code: ---[debug](Graphs:28558): Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
--- End code ---
Is there a way to specify which version to use?
I'm leery of uninstalling GTK+2.0 since that was on my system initially and I don't want to chance breaking something else.
UPDATE:
I just looked through my CodeBlocks linker settings and see that I've added:
--- Code: ---`pkg-config --libs gtk+-3.0`
--- End code ---
Should that be there, should I remove it and let CodeBlocks resolve which version of GTK+ to use, or just remove GTK+2.0?
-Mike
mloutris:
Let me ask some different questions.
For whatever reason, even though I specified linking with GTK+3, CodeBlocks is detecting and using GTK+2.
1. Is there any other place in CodeBlocks besides the linker to specify the version of GTK+ to use?
2. If not, will wxWidgets 3.1.0 work with GTK+2?
Thanks!
stahta01:
--- Quote from: mloutris on February 19, 2018, 12:55:21 am ---Let me ask some different questions.
For whatever reason, even though I specified linking with GTK+3, CodeBlocks is detecting and using GTK+2.
1. Is there any other place to specify the version of GTK+ to use?
2. If not, will wxWidgets work with GTK+2?
Thanks!
--- End quote ---
wxGTK (wxWidgets) links to either GTK 2 or GTK 3.
Tim S.
Navigation
[0] Message Index
[#] Next page
Go to full version