Compile but not run. wxwidgets

0

How about. I am new using this tool.

I'm trying to run a program in c ++, with the wxsmith plugin in code :: blocks. I recently installed wxwidgets, and I wanted to run a program with a single button, compiling it compiles without any problem, but when I run it I get this:

-------------- Run: Debug in test6 (compiler: GNU GCC Compiler)---------------

Checking for existence: /home/tonny/Documents/Codeblocks Projects/wx/test6/bin/Debug/test6
Executing: /home/tonny/Documents/Codeblocks\ Projects/wx/test6/bin/Debug/test6  (in /home/tonny/Documents/Codeblocks Projects/wx/test6/.)
Process terminated with status -1 (0 minute(s), 0 second(s))

In the directory the exe appears to be able to execute it, however if I try to run from there it seems that it does not do anything.

What am I doing wrong?

    
asked by Tonny Davila 28.05.2017 в 05:33
source

2 answers

0

At these points, any code of any language has to be revised little by little to see the failures in calls and related

    
answered by 28.05.2017 в 08:56
0

How about friends. I was able to solve my own mistake.

When I got the output exe after compiling, I decided to run it in the terminal, to which this appeared:

Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

These errors were given to me because I installed the 2 versions of GTK beforehand, as well as installing version 2.8 and 3.0.3 of wxWidgets.

Look for the solution line, however nobody had the error similar to me, since this error usually occurs in python, so I opted for the most obvious solution: Uninstall any of the GTK packages, and be 2.0 or 3.0, and I found that it was best to erase version 2.0.

PLEASE DO NOT!

If you uninstall any of the 2 versions, many dependencies will be uninstalled, in my case among which I realized were Firefox, code :: blocks and the packages for the widgets of the main GUI of ubuntu. My system was horribly optimized so I had to reinstall it.

Having my system clean again, I looked for a tutorial to install everything correctly and found this However it is something old and those packages no longer exist in the repositories so I had to run:

sudo aptitude install libwxgtk3.0-0v5 libwxgtk3.0-dev wx3.0-headers wx-common

This way all the packages with the most stable version of wxWidgets (3.0.3) are downloaded

Finally I executed:

sudo aptitude install codeblocks libcodeblocks0 libwxsmithlib0 codeblocks-contrib

To install code :: blocks again.

I tried to compile and everything worked correctly!

Moral: Never install packages of different versions because it can give errors.

    
answered by 28.05.2017 в 22:04