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.
DavidHart
Site Admin
Posts: 4252 Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK
Post
by DavidHart » Wed Mar 10, 2021 4:34 pm
I did it, now everything is fine, i have uninstalled everything and installed version 3.1 (all the dev ones), and in order for codelite to work the package named lib32-wxgtk3 so now i have the last version and codelite works ok.
I think you mean that you now have both a wx3.1 installed, then CodeLite built against that and now installed. If I misunderstood, please explain what you meant.
The compiler throwed me 10 errors or more, can you help me with those or i need to open a new thread ?
Unless the 10 errors were to do with a mismatch between program and library versions, a new thread would be better.
bgining2this
Knows some wx things
Posts: 29 Joined: Wed Mar 03, 2021 9:24 pm
Post
by bgining2this » Wed Mar 10, 2021 6:06 pm
I really dont know, i think this 10 errors are normal because now i think everything is working ok with 3.1 version of the library, i have commented almoust all my code, triying to find out the reason for this 10 errors heres a fragment of them
Code: Select all
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV20wxMDIParentFrameBase[_ZTV20wxMDIParentFrameBase]+0x2c8): undefined reference to `wxWindowBase::GetDPI() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV20wxMDIParentFrameBase[_ZTV20wxMDIParentFrameBase]+0x328): undefined reference to `wxTopLevelWindowGTK::GetDefaultAttributes() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV20wxMDIParentFrameBase[_ZTV20wxMDIParentFrameBase]+0x450): undefined reference to `wxTopLevelWindowBase::Layout()'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV21wxMDIClientWindowBase[_ZTV21wxMDIClientWindowBase]+0x2c8): undefined reference to `wxWindowBase::GetDPI() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV15wxTDIChildFrame[_ZTV15wxTDIChildFrame]+0x2c8): undefined reference to `wxWindowBase::GetDPI() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV15wxTDIChildFrame[_ZTV15wxTDIChildFrame]+0x328): undefined reference to `wxTopLevelWindowGTK::GetDefaultAttributes() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV15wxTDIChildFrame[_ZTV15wxTDIChildFrame]+0x450): undefined reference to `wxTopLevelWindowBase::Layout()'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV19wxMDIChildFrameBase[_ZTV19wxMDIChildFrameBase]+0x2c8): undefined reference to `wxWindowBase::GetDPI() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV19wxMDIChildFrameBase[_ZTV19wxMDIChildFrameBase]+0x328): undefined reference to `wxTopLevelWindowGTK::GetDefaultAttributes() const'
ld: ../build-Debug/DentalOrganizer/main.cpp.o:(.data.rel.ro._ZTV19wxMDIChildFrameBase[_ZTV19wxMDIChildFrameBase]+0x450): undefined reference to `wxTopLevelWindowBase::Layout()'
make[1]: *** [DentalOrganizer.mk:79: ../build-Debug/bin/DentalOrganizer] Error 1
make[1]: Leaving directory '/home/jorgecg/Documentos/ProyectosCodeliteywxWidgets/TheDentalOrganizer/DentalOrganizer'
make: *** [Makefile:5: All] Error 2
====10 errors, 0 warnings====
DavidHart
Site Admin
Posts: 4252 Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK
Post
by DavidHart » Wed Mar 10, 2021 7:09 pm
now i think everything is working ok with 3.1 version of the library
triying to find out the reason for this 10 errors
I'm confused! Are you telling us that the program is
working , or that it is
crashing with those errors?
bgining2this
Knows some wx things
Posts: 29 Joined: Wed Mar 03, 2021 9:24 pm
Post
by bgining2this » Wed Mar 10, 2021 9:16 pm
Yes, i dont know if it is better, my program had the Warning: Mismatch bla bla bla error, but now when i compile i get 10 errors, i cant even see my Frames (2 of them) with some controls in them. So yes, it is crashing, but i think that now we are in the right path, if i can get rid of these 10 errors i think that the Warning will disappear. But i am only guessing here. This is my program righ now, i have commented more than half of it Thank you
Code: Select all
#include <wx/app.h>
#include <wx/event.h>
//#include "wxcrafter.h"
#include <wx/image.h>
#include <wx/mdi.h>
// Define the MainApp
class MainApp : public wxApp
{
public:
MainApp() {}
virtual ~MainApp() {}
virtual bool OnInit() {
// Add the common image handlers
wxImage::AddHandler( new wxPNGHandler );
wxImage::AddHandler( new wxJPEGHandler );
//MainFrame *mainFrame = new MainFrame(NULL, wxID_ANY, wxT("DentalOrganizer"));
//cHistorialMedico *historial = new cHistorialMedico(mainFrame, wxID_ANY, wxT("Historial Medico"));
//SetTopWindow(mainFrame);
//historial->Show(true);
wxMDIParentFrame *principal = new wxMDIParentFrame(NULL, wxID_ANY, wxT("Principal"));
wxMDIChildFrame *cHistorial = new wxMDIChildFrame(principal, wxID_ANY, wxT("Historial Medico"));
SetTopWindow(principal);
cHistorial->Show(true);
principal->Show(true);
return GetTopWindow()->Show();
}
};
DECLARE_APP(MainApp)
IMPLEMENT_APP(MainApp)
ONEEYEMAN
Part Of The Furniture
Posts: 7449 Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine
Post
by ONEEYEMAN » Wed Mar 10, 2021 9:25 pm
Hi,
Now I'm really confused - how can yoyu run anything when you are getting link errors?
You are not creating an executable and so you will not be able to run anything and so you will not see anything as well.
You need to fix those errors.
Please post the link command you project uses.
Thank you.
bgining2this
Knows some wx things
Posts: 29 Joined: Wed Mar 03, 2021 9:24 pm
Post
by bgining2this » Wed Mar 10, 2021 9:29 pm
Sorry this are my linker options
Code: Select all
$(shell /usr/local/bin/wx-config --libs --unicode=yes)
ONEEYEMAN
Part Of The Furniture
Posts: 7449 Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine
Post
by ONEEYEMAN » Wed Mar 10, 2021 9:31 pm
Hi,
If you do:
what is the output?
Thank you.
bgining2this
Knows some wx things
Posts: 29 Joined: Wed Mar 03, 2021 9:24 pm
Post
by bgining2this » Wed Mar 10, 2021 9:34 pm
This is the output of that command
Code: Select all
✝ ~ ls -la /usr/local/lib
rwxr-xr-x 7 root root 4 KiB Sun Oct 6 21:15:38 2019 ./
rwxr-xr-x 12 root root 4 KiB Sat Apr 13 02:01:11 2019 ../
rwxr-xr-x 2 root root 4 KiB Wed Jun 12 19:59:44 2019 calf/
rwxr-xr-x 3 root root 4 KiB Fri Apr 19 18:48:20 2019 cmake/
rwxr-xr-x 4 root root 4 KiB Wed Jun 12 19:59:45 2019 lv2/
rwxr-xr-x 11 root root 4 KiB Sun Oct 6 21:15:49 2019 wingpro7.0/
rwxr-xr-x 4 root root 4 KiB Mon Sep 9 13:56:51 2019 wx/
rwxrwxrwx 1 root root 17 B Fri Apr 19 18:48:20 2019 libAlembic.so ⇒ libAlembic.so.1.7
rwxrwxrwx 1 root root 20 B Fri Apr 19 18:48:20 2019 libAlembic.so.1.7 ⇒ libAlembic.so.1.7.10
rwxr-xr-x 1 root root 4 MiB Fri Apr 19 18:46:06 2019 libAlembic.so.1.7.10
rwxrwxrwx 1 root root 20 B Mon Sep 9 13:56:51 2019 libwx_baseu-3.1.so ⇒ libwx_baseu-3.1.so.2
rwxrwxrwx 1 root root 24 B Mon Sep 9 13:56:51 2019 libwx_baseu-3.1.so.2 ⇒ libwx_baseu-3.1.so.2.0.0
rwxr-xr-x 1 root root 3 MiB Mon Sep 9 13:56:51 2019 libwx_baseu-3.1.so.2.0.0
rwxrwxrwx 1 root root 24 B Mon Sep 9 13:56:51 2019 libwx_baseu_net-3.1.so ⇒ libwx_baseu_net-3.1.so.2
rwxrwxrwx 1 root root 28 B Mon Sep 9 13:56:51 2019 libwx_baseu_net-3.1.so.2 ⇒ libwx_baseu_net-3.1.so.2.0.0
rwxr-xr-x 1 root root 374 KiB Mon Sep 9 13:56:51 2019 libwx_baseu_net-3.1.so.2.0.0
rwxrwxrwx 1 root root 24 B Mon Sep 9 13:56:51 2019 libwx_baseu_xml-3.1.so ⇒ libwx_baseu_xml-3.1.so.2
rwxrwxrwx 1 root root 28 B Mon Sep 9 13:56:51 2019 libwx_baseu_xml-3.1.so.2 ⇒ libwx_baseu_xml-3.1.so.2.0.0
rwxr-xr-x 1 root root 96 KiB Mon Sep 9 13:56:51 2019 libwx_baseu_xml-3.1.so.2.0.0
rwxrwxrwx 1 root root 24 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_adv-3.1.so ⇒ libwx_gtk2u_adv-3.1.so.2
rwxrwxrwx 1 root root 28 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_adv-3.1.so.2 ⇒ libwx_gtk2u_adv-3.1.so.2.0.0
rwxr-xr-x 1 root root 15 KiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_adv-3.1.so.2.0.0
rwxrwxrwx 1 root root 24 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_aui-3.1.so ⇒ libwx_gtk2u_aui-3.1.so.2
rwxrwxrwx 1 root root 28 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_aui-3.1.so.2 ⇒ libwx_gtk2u_aui-3.1.so.2.0.0
rwxr-xr-x 1 root root 832 KiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_aui-3.1.so.2.0.0
rwxrwxrwx 1 root root 25 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_core-3.1.so ⇒ libwx_gtk2u_core-3.1.so.2
rwxrwxrwx 1 root root 29 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_core-3.1.so.2 ⇒ libwx_gtk2u_core-3.1.so.2.0.0
rwxr-xr-x 1 root root 10 MiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_core-3.1.so.2.0.0
rwxrwxrwx 1 root root 23 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_gl-3.1.so ⇒ libwx_gtk2u_gl-3.1.so.2
rwxrwxrwx 1 root root 27 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_gl-3.1.so.2 ⇒ libwx_gtk2u_gl-3.1.so.2.0.0
rwxr-xr-x 1 root root 139 KiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_gl-3.1.so.2.0.0
rwxrwxrwx 1 root root 25 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_html-3.1.so ⇒ libwx_gtk2u_html-3.1.so.2
rwxrwxrwx 1 root root 29 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_html-3.1.so.2 ⇒ libwx_gtk2u_html-3.1.so.2.0.0
rwxr-xr-x 1 root root 1 MiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_html-3.1.so.2.0.0
rwxrwxrwx 1 root root 26 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_media-3.1.so ⇒ libwx_gtk2u_media-3.1.so.2
rwxrwxrwx 1 root root 30 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_media-3.1.so.2 ⇒ libwx_gtk2u_media-3.1.so.2.0.0
rwxr-xr-x 1 root root 187 KiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_media-3.1.so.2.0.0
rwxrwxrwx 1 root root 29 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_propgrid-3.1.so ⇒ libwx_gtk2u_propgrid-3.1.so.2
rwxrwxrwx 1 root root 33 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_propgrid-3.1.so.2 ⇒ libwx_gtk2u_propgrid-3.1.so.2.0.0
rwxr-xr-x 1 root root 1 MiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_propgrid-3.1.so.2.0.0
rwxrwxrwx 1 root root 23 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_qa-3.1.so ⇒ libwx_gtk2u_qa-3.1.so.2
rwxrwxrwx 1 root root 27 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_qa-3.1.so.2 ⇒ libwx_gtk2u_qa-3.1.so.2.0.0
rwxr-xr-x 1 root root 256 KiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_qa-3.1.so.2.0.0
rwxrwxrwx 1 root root 27 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_ribbon-3.1.so ⇒ libwx_gtk2u_ribbon-3.1.so.2
rwxrwxrwx 1 root root 31 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_ribbon-3.1.so.2 ⇒ libwx_gtk2u_ribbon-3.1.so.2.0.0
rwxr-xr-x 1 root root 688 KiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_ribbon-3.1.so.2.0.0
rwxrwxrwx 1 root root 29 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_richtext-3.1.so ⇒ libwx_gtk2u_richtext-3.1.so.2
rwxrwxrwx 1 root root 33 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_richtext-3.1.so.2 ⇒ libwx_gtk2u_richtext-3.1.so.2.0.0
rwxr-xr-x 1 root root 2 MiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_richtext-3.1.so.2.0.0
rwxrwxrwx 1 root root 24 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_stc-3.1.so ⇒ libwx_gtk2u_stc-3.1.so.2
rwxrwxrwx 1 root root 28 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_stc-3.1.so.2 ⇒ libwx_gtk2u_stc-3.1.so.2.0.0
rwxr-xr-x 1 root root 3 MiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_stc-3.1.so.2.0.0
rwxrwxrwx 1 root root 28 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_webview-3.1.so ⇒ libwx_gtk2u_webview-3.1.so.2
rwxrwxrwx 1 root root 32 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_webview-3.1.so.2 ⇒ libwx_gtk2u_webview-3.1.so.2.0.0
rwxr-xr-x 1 root root 181 KiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_webview-3.1.so.2.0.0
rwxrwxrwx 1 root root 24 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_xrc-3.1.so ⇒ libwx_gtk2u_xrc-3.1.so.2
rwxrwxrwx 1 root root 28 B Mon Sep 9 13:56:51 2019 libwx_gtk2u_xrc-3.1.so.2 ⇒ libwx_gtk2u_xrc-3.1.so.2.0.0
rwxr-xr-x 1 root root 1 MiB Mon Sep 9 13:56:51 2019 libwx_gtk2u_xrc-3.1.so.2.0.0
✝ ~
ONEEYEMAN
Part Of The Furniture
Posts: 7449 Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine
Post
by ONEEYEMAN » Wed Mar 10, 2021 9:46 pm
Hi,
What happen if you run in Terminal:
Code: Select all
/usr/local/bin/wx-config --libs --unicode=yes
?
Thank you.
bgining2this
Knows some wx things
Posts: 29 Joined: Wed Mar 03, 2021 9:24 pm
Post
by bgining2this » Wed Mar 10, 2021 9:49 pm
Hello
This is the output for the last command
Code: Select all
✝ ~ /usr/local/bin/wx-config --libs --unicode=yes
-L/usr/local/lib -pthread -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1
✝ ~
DavidHart
Site Admin
Posts: 4252 Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK
Post
by DavidHart » Wed Mar 10, 2021 10:06 pm
What is the output of doing, in a terminal:
ldd /path/to/your/executable
And, while you're there,
ls -l /path/to/your/executable
to find when that executable was compiled. Just to check that it is not left over from an old build...
bgining2this
Knows some wx things
Posts: 29 Joined: Wed Mar 03, 2021 9:24 pm
Post
by bgining2this » Wed Mar 10, 2021 10:15 pm
Hello
In the past i had a executable in this path, but now theres nothing in the directory
Code: Select all
✝ ~/Documentos/ProyectosCodeliteywxWidgets/TheDentalOrganizer/build-Debug/bin ldd
ldd: faltan los ficheros de argumentos
Pruebe `ldd --help' para más información.
✘ ✝ ~/Documentos/ProyectosCodeliteywxWidgets/TheDentalOrganizer/build-Debug/bin ls -l
Nothing to show here
✝ ~/Documentos/ProyectosCodeliteywxWidgets/TheDentalOrganizer/build-Debug/bin
DavidHart
Site Admin
Posts: 4252 Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK
Post
by DavidHart » Wed Mar 10, 2021 11:00 pm
And yet you can run some program, somewhere, to produce those errors?!
Please would you attach here an archive of your Project, with its current code, so that we can test it.
bgining2this
Knows some wx things
Posts: 29 Joined: Wed Mar 03, 2021 9:24 pm
Post
by bgining2this » Thu Mar 11, 2021 12:41 am
My actual project code i have post it above but here it is again, i really dont understand why so little code generates so manay compiler errors
This code is in main.cpp in my project i have more code but it is desabled untill i find out whats the problem
Code: Select all
#include <wx/app.h>
#include <wx/event.h>
//#include "wxcrafter.h"
#include <wx/image.h>
#include <wx/mdi.h>
// Define the MainApp
class MainApp : public wxApp
{
public:
MainApp() {}
virtual ~MainApp() {}
virtual bool OnInit() {
// Add the common image handlers
wxImage::AddHandler( new wxPNGHandler );
wxImage::AddHandler( new wxJPEGHandler );
//MainFrame *mainFrame = new MainFrame(NULL, wxID_ANY, wxT("DentalOrganizer"));
//cHistorialMedico *historial = new cHistorialMedico(mainFrame, wxID_ANY, wxT("Historial Medico"));
//SetTopWindow(mainFrame);
//historial->Show(true);
wxMDIParentFrame *principal = new wxMDIParentFrame(NULL, wxID_ANY, wxT("Principal"));
wxMDIChildFrame *cHistorial = new wxMDIChildFrame(principal, wxID_ANY, wxT("Historial Medico"));
SetTopWindow(principal);
cHistorial->Show(true);
principal->Show(true);
return GetTopWindow()->Show();
}
};
DECLARE_APP(MainApp)
IMPLEMENT_APP(MainApp)
Thank you again
ONEEYEMAN
Part Of The Furniture
Posts: 7449 Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine
Post
by ONEEYEMAN » Thu Mar 11, 2021 1:13 am
Hi,
Those are not compiler errors, but link errors.
You can uncomment all this code and it will still compile, but not link This is different.
Try to change you link options to be:
@DavidHart - will this work?
Thank you.