Problems with wxCalendarCtrl and wxDateTimePickerCtrl Topic is solved

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
nji
Earned a small fee
Earned a small fee
Posts: 22
Joined: Wed May 03, 2017 8:03 am

Problems with wxCalendarCtrl and wxDateTimePickerCtrl

Post by nji »

I recently installed C:B 16.01 with mingw4.9.2 and the corresponding wxwidgets binaries (under Win7 Prof 64).
In a simple wxwidgets project with wxsmith I get problems when I use wxCalendarCtrl and wxDateTimePickerCtrl.
Building it says:

Code: Select all

C:\PROGRA~2\COMMON~1\wxwidget\include\wx\msw\datetimectrl.h|22|undefined reference to `vtable for wxDateTimePickerCtrl'|
obj\Debug\ErrorTestMain.o: In function `ZN20wxDateTimePickerCtrlD2Ev':
Being a newbie I don't know what is wrong here ...
Help appreciated.
User avatar
doublemax
Moderator
Moderator
Posts: 19102
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problems with wxCalendarCtrl and wxDateTimePickerCtrl

Post by doublemax »

wxCalendarCtrl and wxDateTimePickerCtrl are inside the "wxAdvanced" library, which is probably not in the list of libraries in your CB project.

If you're using wxWidgets 3.0.x, the filenames for that library will be:
libwxmsw30u_adv.a (release configuration)
libwxmsw30ud_adv.a (debug configuration)

For wxWidgets 3.1.x, replace the "30" with "31".

Add these to the libraries under Project -> Build options -> Linker settings.
There should already be a few wxWidgets libraries listed.

(As i don't use C:B, i'm not sure if this is 100% correct, but it should move you in the right direction)
Use the source, Luke!
nji
Earned a small fee
Earned a small fee
Posts: 22
Joined: Wed May 03, 2017 8:03 am

Re: Problems with wxCalendarCtrl and wxDateTimePickerCtrl

Post by nji »

Yes, that solved it.

I suspected a more complex reason, as the other "advanced widgets" (for example "colorpicker") linked without problem.

Kind of amusing however:
The produced exes are huge (as of all included functionality), but standard controls still aren't included :?
(Compared to MFC's exe size and libs).

Thank you (again)!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Problems with wxCalendarCtrl and wxDateTimePickerCtrl

Post by ONEEYEMAN »

Hi,
You can decrease the size of the executable by excluding all or some of the following:
- all or some of the bitmap handling libraries. They are compiled statically and if you will not use some (or all) of the formats you can exclude them.
- regex library. If you will use C++11 (don't know why you shouldn't) then this library becomes obsolete.
- xml library. If you don't use XML or the XRC system (wxWidgets resource system) you can exclude libxml.

But most important one is the first.

Thank you.
nji
Earned a small fee
Earned a small fee
Posts: 22
Joined: Wed May 03, 2017 8:03 am

Re: Problems with wxCalendarCtrl and wxDateTimePickerCtrl

Post by nji »

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

Re: Problems with wxCalendarCtrl and wxDateTimePickerCtrl

Post by ONEEYEMAN »

You just needs to recompile the library and rebuild the project to see the results. ;-)
User avatar
doublemax
Moderator
Moderator
Posts: 19102
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problems with wxCalendarCtrl and wxDateTimePickerCtrl

Post by doublemax »

Don't bother with trying to reduce the exe size. Even if you strip some unneeded libraries, the decrease in size will be very small. It's just not worth the effort.
Use the source, Luke!
Post Reply