Recent Posts

Pages: 1 2 3 4 5 [6] 7 8 9 10
51
All,
I am running Ubunut 16.04 and have versions of GTK 2 and 3 installed:
Code: [Select]
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

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: [Select]
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'
I then edited /etc/apt/sources.list to remove the comment indicator, #, at the start of the line.
Code: [Select]
sudo apt-get update
sudo apt-get install libwxbase3.1-0-unofficial

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: [Select]
[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

How does one configure the version of GTK to be used for wxWidgets please?
52
General (but related to Code::Blocks) / Re: Welcome Newcomers - PLEASE READ!!!
« Last post by mloutris on February 18, 2018, 11:10:59 pm »
I think therefore I will not spam!
Glad to be here and thank you all for a powerful yet intuitive IDE!
53
General (but related to Code::Blocks) / Re: Welcome Newcomers - PLEASE READ!!!
« Last post by VasilakiG on February 18, 2018, 03:38:38 pm »
I am new, I am here!
54
Help / Re: How do I use a specific wxWidgets directory
« Last post by stahta01 on February 18, 2018, 03:30:27 pm »
I would use update-alternatives instead of editing the project path to wx-config.

http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Linux#Checking_the_presence_of_libwxGTK_library

Tim S.
55
Help / Re: How do I use a specific wxWidgets directory
« Last post by Flowers on February 18, 2018, 03:20:16 pm »
Thank you. That has solved it and I have now compiled and run my first wxWidgets program in Code::Blocks.
Is there any way I can set my directory as the default when creating a new project?
56
Using Code::Blocks / Re: How to run / debug a single file (without a project)
« Last post by neuronet on February 18, 2018, 03:11:01 pm »
I just use the terminal for such one-offs. I'm in linux, so:

Code: [Select]
g++ -o executable_name the_file.cpp
./executable_name

And voila! But, yeah, once you use code::blocks you have incurred an overhead and why fight the framework? I just make a folder for the simple little one-off scripts, and then in the same folder I will also start projects. It's easy to tell them apart.
57
Help / Re: How do I use a specific wxWidgets directory
« Last post by oBFusCATed on February 18, 2018, 10:35:36 am »
Search for `wx-config ...` in the project build options and replace them with the full path to your wx-config version.
58
Help / How do I use a specific wxWidgets directory
« Last post by Flowers on February 18, 2018, 10:16:14 am »
I am working on Ubuntu 16.04 and trying to use Code::Blocks and wxWidgets. I have compiled wxWidgets 3.0.3 to /opt and compiled Code::Blocks 17.12 using that version of wxWidgets. Code::Blocks is installed to /usr/local. When I generate a wxWidgets project then compile and run, it terminates with status -6 with no obvious signs of creating a window. Looking at the compile messages, it is obviously using the wxWidgets I have in /usr. How can I tell Code::Blocks I want to use the wxWidgets in /opt? Is this likely to be the problem?
I'm afraid I am fairly new to Ubuntu, so apologies if this is an Ubuntu problem.
59
General (but related to Code::Blocks) / Re: Welcome Newcomers - PLEASE READ!!!
« Last post by Flowers on February 18, 2018, 08:44:14 am »
I am new to Code::Blocks, trying to move away from Windows and write on Ubuntu.
60
Help / Re: Indentation ignored
« Last post by ordak on February 18, 2018, 05:24:04 am »
Settings -> Editor
Indent option make sure "Auto Indent" is checked.

Tim S.

Ok, I enabled "Auto Indent" as you said, and the problem seems to be gone.
Pages: 1 2 3 4 5 [6] 7 8 9 10