wxWidgets dirs, money manager ex, and compiling.

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
cupdrat
In need of some credit
In need of some credit
Posts: 7
Joined: Sun Mar 21, 2021 6:36 pm

wxWidgets dirs, money manager ex, and compiling.

Post by cupdrat »

"Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile..." yes I do.

trying to create a new form for 'money manager ex'. used glade to get the form where it will display itself.

the form should only allow numeric input so I was going to use 'mmex' validators.h file which is in the 'src' dir[where I put my form and glade file, but the validators.h file contains the following include: #include "mmTextCtrl.h". which in turn contains the following include: #include <wx/textctrl.h>; and anything that has: #include <wx/WHATEVER.WHATEVER> does not appear to complie with gcc.

what ever happened to oop? :roll:

it is refering to files in usr/include/wx-3.0/wx/


so question;
how do make my program module aware of the 'usr/include/wx-3.0/wx/' dir so it accept all references in other modules and will compile with gcc, and so my module will be able to use the validators.h file?

thanks.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxWidgets dirs, money manager ex, and compiling.

Post by ONEEYEMAN »

Hi,
Which OS are trying it under?
Which compiler?
Which wx version?
Did you build wx yourself or install it from the repo/download the pre-built binary?
How do you build you application?
Can you build the validate sample provided with the library?
What IDE you are using (if any)?

Thank you.
cupdrat
In need of some credit
In need of some credit
Posts: 7
Joined: Sun Mar 21, 2021 6:36 pm

Re: wxWidgets dirs, money manager ex, and compiling.

Post by cupdrat »

ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am
Which OS are trying it under?
ubuntu 20.04.2 lts 64bit
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am Which compiler?
The C compiler identification is GNU 9.3.0
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am Which wx version?
[cmake] -- wxWidgets 3.0.4
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am Did you build wx yourself or install it from the repo/download the pre-built binary?
did not build wx myself
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am How do you build you application?
I build my form/module like so: gcc -o OUTFILE cFILE.c -Wall `pkg-config --cflags --libs gtk+-3.0` -export-dynamic
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am Can you build the validate sample provided with the library?
?? am trying to use the mmex 'validators.h' file[because my program/code/module will be part of mmex]. the validators.h file should be already built because when I run money manager ' ./mmex ' the Program runs and the fields that should allow only numbers, only allow numbers. If wx has a numbers only input capture and display where is sample located?
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am What IDE you are using (if any)?
visual studio code 1.54.3

remember I am trying to add to mmex; that is what open source is about, if a program does not have/do something - then YOU the end user can change it/add that feature.
and I refer to my orginal post about "the form should only allow numeric input so I was ..." and the "...usr/include/wx-3.0/wx/" dir.

more infor dump
[cmake] -- Linux 5.8.0-48-generic
[cmake] -- Ubuntu 20.04 'focal'
[cmake] -- CMake 3.16.3
[cmake] -- Ninja 1.10.0
[cmake] -- ccache 3.7.7
[cmake] -- GNU 9.3.0
[cmake] -- wxWidgets 3.0.4
[cmake] -- wxSQLite3 4.6.0
[cmake] -- RapidJSON 1.1.0
[cmake] -- Lua 5.3.3
[cmake] -- curl 7.68.0
[cmake] -- gettext 0.19.8.1
[cmake] -- ------------------ 8< -----------------
[cmake] -- Configuring done
[cmake] -- Generating done

thanks
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxWidgets dirs, money manager ex, and compiling.

Post by ONEEYEMAN »

Hi,
cupdrat wrote: Sat Mar 27, 2021 5:38 am
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am Which compiler?
The C compiler identification is GNU 9.3.0
wxWidgets is a C++ library. :D
cupdrat wrote: Sat Mar 27, 2021 5:38 am
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am Which wx version?
[cmake] -- wxWidgets 3.0.4
So you installed it from the repository.
cupdrat wrote: Sat Mar 27, 2021 5:38 am
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am How do you build you application?
I build my form/module like so: gcc -o OUTFILE cFILE.c -Wall `pkg-config --cflags --libs gtk+-3.0` -export-dynamic
I'm surprised the build succeeded.
You should build it as

Code: Select all

gcc -o OUTFILE cFILE.c -Wall `wx-config --cxxflags --libs` 
cupdrat wrote: Sat Mar 27, 2021 5:38 am
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am Can you build the validate sample provided with the library?
?? am trying to use the mmex 'validators.h' file[because my program/code/module will be part of mmex]. the validators.h file should be already built because when I run money manager ' ./mmex ' the Program runs and the fields that should allow only numbers, only allow numbers. If wx has a numbers only input capture and display where is sample located?
There shuold be a packet called wxWidgets-samples or smth to that extent. Query you repository.
Or maybe the easier would be to grab wxWidgets sources and then navigate to wxWidgets/samples/validate.

You can also check the documentation
cupdrat wrote: Sat Mar 27, 2021 5:38 am
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am What IDE you are using (if any)?
visual studio code 1.54.3

remember I am trying to add to mmex; that is what open source is about, if a program does not have/do something - then YOU the end user can change it/add that feature.
and I refer to my orginal post about "the form should only allow numeric input so I was ..." and the "...usr/include/wx-3.0/wx/" dir.

Check that sample and documentation.

Thank you.
cupdrat
In need of some credit
In need of some credit
Posts: 7
Joined: Sun Mar 21, 2021 6:36 pm

Re: wxWidgets dirs, money manager ex, and compiling.

Post by cupdrat »

ONEEYEMAN wrote: Sun Mar 28, 2021 1:10 am
wxWidgets is a C++ library. :D
GNU 9.3.0 is a c++ compiler
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am I'm surprised the build succeeded.
You should build it as

Code: Select all

gcc -o OUTFILE cFILE.c -Wall `wx-config --cxxflags --libs` 
gcc -o OUTFILE cFILE.c -Wall `wx-config --cxxflags --libs`

results in

fatal error: gtk/gtk.h: No such file or directory
6 | #include <gtk/gtk.h> // GTK Library
compilation terminated.

gcc -o OUTFILE cFILE.c -Wall `pkg-config --cflags --libs gtk+-3.0` -export-dynamic
results in compilation.

back to basic question, how is program(s)/code/module made aware of the 'usr/include/wx-3.0/wx/' dir so it will accept all references in other modules. back orginal post~ the code to validate is already there in the file 'validators.h'.

what is the difference between:
#include "WHATEVER.h" and
#include <WHATEVER.h> or
#include <WHATEVER/WHATEVER/WHATEVER.h> ?

it appears that < > results in "No such file or directory"

what is the difference between "" and <>?

thanks
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxWidgets dirs, money manager ex, and compiling.

Post by ONEEYEMAN »

Hi,
cupdrat wrote: Sun Mar 28, 2021 5:14 am
ONEEYEMAN wrote: Mon Mar 22, 2021 12:25 am I'm surprised the build succeeded.
You should build it as

Code: Select all

gcc -o OUTFILE cFILE.c -Wall `wx-config --cxxflags --libs` 
gcc -o OUTFILE cFILE.c -Wall `wx-config --cxxflags --libs`

results in

fatal error: gtk/gtk.h: No such file or directory
6 | #include <gtk/gtk.h> // GTK Library
compilation terminated.

gcc -o OUTFILE cFILE.c -Wall `pkg-config --cflags --libs gtk+-3.0` -export-dynamic
results in compilation.
Why are you trying to include GTK+ header?
They don't have any business here as long as your application is working with wx..

Moreover, if you are working with wx you compilation command shuold have been failing because
the compiler will not know where to find wx headers and libraries.
cupdrat wrote: Sun Mar 28, 2021 5:14 am back to basic question, how is program(s)/code/module made aware of the 'usr/include/wx-3.0/wx/' dir so it will accept all references in other modules. back orginal post~ the code to validate is already there in the file 'validators.h'.
You need to use

Code: Select all

wx-config --cxxflags --libs
when compiling your own code.

If you run it from the Terminal - what would be the output?
cupdrat wrote: Sun Mar 28, 2021 5:14 am what is the difference between:
#include "WHATEVER.h" and
#include <WHATEVER.h> or
#include <WHATEVER/WHATEVER/WHATEVER.h> ?

it appears that < > results in "No such file or directory"

what is the difference between "" and <>?

thanks
Back to validators and input only integer number - wx provides a way to do so. You don't have to use any other means.

Now, here is the trick question - is you form using plain GTK or does it utilizes any wx functionality?

Thank you.
Post Reply