Hello I have installed wxWidget-3.1.0 s on windows it works fine using it from MSVC++. But On Linux fedora 27 I built it in a sub-directory "wxWidget3.1.0/build-gtk-unicode-release".
These are the comands:
../configure --disable-debug
make
sudo make install
sudo ldconfig
Above it generates for me a release shared library I get around building programs upon it. So I easily use "wx-config --cxxflags --libs
". For Ides like Eclipse, Codeblocks, Kdevelop.
The problem is I need some "static version" of the library so I created another sub-directory: "wxWidgets-3.1.0/build-gtk-static-release-unicode" So I issued the commands:
../configure --disable-debug --disable-shared --enable-unicode
make
sudo make install
I created a project with Codeblocks and it compiles easily with adding only "
wx-config --cxxflags --libs
"When it comes to Eclipse CDT I used
wx-config --cxxflags
for the compiler andwx-config --libs
for the linker. But it fails complaining about "Unreferenced defeinition of the APIs".After a long search I Find a tricky workaround:
Project->Properties->C/C++->GCC C++ Linker->Experts settings: ${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
So I made the "Flags" at the end to become:
${COMMAND} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} ${FLAGS}
And it works fine.
*** The problem:
I'd like to configure Kdevelop for wxWidgets as a static library keep in mind as a dynamic library I managed to do that. So My Configurations are:
From Kdevelop->Project->Open Configuration->CMake File->CXX_COMPILER_FLAGS I enters:
The result of wx-config --cxxflags
in a terminal.
And for the linker:
CXX_LNKER_FLAGS:
The reult of wx-config --libs
But The code compiles but doesn't build I don't have "expert settings" as in Eclipse CDT.
Can anyone solve how to link to wxWidgets from Kdevelop statically?
Thank you for this boring long story. NB: I Added What problems I faced and what did to get around them to help people who face the same problems. Thank you in advance.