[MSW] Bundled wx-config and oleacc library

Discussion about CodeLite development process and patches
PB_
CodeLite Curious
Posts: 1
Joined: Sun Jul 09, 2017 5:17 pm
Genuine User: Yes
IDE Question: C++
Contact:

[MSW] Bundled wx-config and oleacc library

Post by PB_ »

(I am not a CodeLite user, so I may have missed something obvious, sorry for that)

Hi,

I installed CodeLite (v10.0.6, Windows Installer 64 bit) and created a project using "Executable (wxWidgets enabled)" project template. I built wxWidgets GIT master with MinGW (5.3) and set wxcfg in the CodeLite Project Settings/Environment/Additional Environment Variables for the debug configuration to "gcc_lib/mswud". When building the project I ended up with errors:

Code: Select all

C:\Windows\system32\cmd.exe /C L:/MinGW/bin/mingw32-make.exe -j2 SHELL=cmd.exe -e -f  Makefile
"----------Building project:[ minimal - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'F:/Dev/Desktop/CodeLiteTest/minimal'
L:/MinGW/bin/g++.exe  -c  "F:/Dev/Desktop/CodeLiteTest/minimal/main.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:/Dev/Desktop/wxWidgets-GIT/lib/gcc_lib/mswud -IC:/Dev/Desktop/wxWidgets-GIT/include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0  -std=gnu++11   -o ./Debug/main.cpp.o -I.
L:/MinGW/bin/g++.exe -o ./Debug/minimal @"minimal.txt" -L.   -mwindows  -mthreads -LC:/Dev/Desktop/wxWidgets-GIT/lib/gcc_lib -lwxmsw31ud_richtext -lwxmsw31ud_xrc -lwxmsw31ud_aui -lwxmsw31ud_html -lwxmsw31ud_adv -lwxmsw31ud_core -lwxbase31ud_xml -lwxbase31ud_net -lwxbase31ud -lwxscintillad -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexud -lwinspool -lwinmm -lshell32 -lcomctl32 -lversion -lshlwapi -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
C:/Dev/Desktop/wxWidgets-GIT/lib/gcc_lib/libwxmsw31ud_core.a(corelib_window.o): In function `ZN8wxWindow16MSWHandleMessageEPljjl':
C:\Dev\Desktop\wxWidgets-GIT\build\msw/../../src/msw/window.cpp:3270: undefined reference to `LresultFromObject@12'
C:/Dev/Desktop/wxWidgets-GIT/lib/gcc_lib/libwxmsw31ud_core.a(corelib_access.o): In function `ZN12wxAccessible17GetIAccessibleStdEv':
C:\Dev\Desktop\wxWidgets-GIT\build\msw/../../src/msw/ole/access.cpp:1806: undefined reference to `CreateStdAccessibleObject@16'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/minimal] Error 1
mingw32-make.exe: *** [All] Error 2
minimal.mk:79: recipe for target 'Debug/minimal' failed
mingw32-make.exe[1]: Leaving directory 'F:/Dev/Desktop/CodeLiteTest/minimal'
Makefile:4: recipe for target 'All' failed
====3 errors, 0 warnings, total time: 00:00:15 seconds====
Default MSW build of wxWidgets master has required linking with oleacc library for some time now, see
https://github.com/wxWidgets/wxWidgets/ ... 38a783ed3f
https://github.com/Kitware/CMake/commit ... 3c8b88aaa5

I have tried to add oleacc to Project Settings/Global Settings/Linker/Libraries but it did not help (probably because of the library order on the command line). I managed to work around the issue by appending ";-loleacc" in Project Settings/Linker/Linker Options.

Perhaps it would be a good idea to make the bundled wx-config to always output oleacc library for the MinGW builds? The wx-config has the code

Code: Select all

if (sho["wxUSE_OLE"])
   po["__LIB_OLEACC_p"] = addLib("oleacc"); // NOTE: not being used
But for some reason the build.cfg file never contains USE_OLE (nor USE_ACCESSIBILITY) even when the matching setup.h contains "#define wxUSE_OLE 1"?!

Thanks for reading this long post.

BTW, the project builds just fine with DLL build of wxWidgets, e.g. wxcfg=gcc_dll/mswud.