Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: dcbdbis on May 18, 2016, 02:25:56 am

Title: [SOLVED] C::B 16.01 & wxWidgets 3.1 still reporting 3.0.2
Post by: dcbdbis on May 18, 2016, 02:25:56 am
Good evening everyone,

Reloaded my system from FreeBSD to Arch Linux x64. When I reloaded it, I downloaded, compiled, and installed wxWidgets 3.1. No issues.

The issue is that those projects that were built with 3.0.2, are still reporting in as 3.0.2. And I'm stumped as why.

Here is my compiler output:
//--------------------------Begin cut-n-paste

-------------- Clean: Debug in BicycleGearingCalculator (compiler: GNU GCC Compiler)---------------

Cleaned "BicycleGearingCalculator - Debug"

-------------- Build: Debug in BicycleGearingCalculator (compiler: GNU GCC Compiler)---------------

g++ -std=c++98 -m64 -I/usr/lib/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -std=c++98 -m64 -g -I../../../../../usr/local/include/wx-3.1 -I../../../../../usr/local/lib/wx/include/gtk2-unicode-static-3.1 -I../../../../../usr/local/include/wx-3.1 -I../../../../../usr/local/lib/wx/include/gtk2-unicode-static-3.1 -c "/media/Misc/Projects/CodeBlocks/Bicycle Gearing Calculator/BicycleGearingCalculatorApp.cpp" -o obj/Debug/BicycleGearingCalculatorApp.o
g++ -std=c++98 -m64 -I/usr/lib/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -std=c++98 -m64 -g -I../../../../../usr/local/include/wx-3.1 -I../../../../../usr/local/lib/wx/include/gtk2-unicode-static-3.1 -I../../../../../usr/local/include/wx-3.1 -I../../../../../usr/local/lib/wx/include/gtk2-unicode-static-3.1 -c "/media/Misc/Projects/CodeBlocks/Bicycle Gearing Calculator/BicycleGearingCalculatorMain.cpp" -o obj/Debug/BicycleGearingCalculatorMain.o
g++  -o bin/Debug/BicycleGearingCalculator obj/Debug/BicycleGearingCalculatorApp.o obj/Debug/BicycleGearingCalculatorMain.o  -m64 -m64 -pthread   -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_webview-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0   
Output file is bin/Debug/BicycleGearingCalculator with size 748.13 KB
Process terminated with status 0 (0 minute(s), 5 second(s))
0 error(s), 0 warning(s) (0 minute(s), 5 second(s))
//------------------End cut-n-paste.


Here are my search directories in C::B: Project->Build Options ->Search Directories->Compiler

//----------------Begin cut-n-paste
../../../../../usr/local/include/wx-3.1
../../../../../usr/local/lib/wx/include/gtk2-unicode-static-3.1
//----------------End cut-n-paste

In my global variables I have set wx as:

base=/usr/local/lib
include=/usr/local/include/wx-3.1
lib=/usr/local/lib

I have validated and verified that in the above paths is where wxWidgets 3.1 installed itself. Why is my compiler though, still pulling from "usr/lib/wx/include/gtk2-unicode-3.0", which is where Arch Linux put 3.02. Where in my projects do I need to go to correct this?


Can someone please help me determine why my projects (in the about window) are reporting being built with 3.0.2?


Sincerely and respectfully,


Dave
Title: Re: C::B 16.01 & wxWidgets 3.1 still reporting 3.0.2
Post by: oBFusCATed on May 18, 2016, 08:29:40 pm
Are you sure that the correct wx-config script is used?
This is the proper way to setup compiler and linker flags for wx on linux/bsd/osx.
Title: Re: C::B 16.01 & wxWidgets 3.1 still reporting 3.0.2
Post by: dcbdbis on May 19, 2016, 04:49:27 am
Thank you for the reply. I appreciate it. Yes. I am sure.

I did solve the problem though. Arch already installed the 3.02 wxWidget packages. But I had not built wxWidgets 3.1 as a shared library. But only as a static library.

Once I rebuilt the library following this wiki https://wiki.wxwidgets.org/Compiling_and_getting_started (https://wiki.wxwidgets.org/Compiling_and_getting_started) and in particular built the library with this line: "./configure --enable-debug", as the wiki recommended.....My problems went away. Now my apps correctly report 3.1, and no longer report in 3.0.2.


Sincerely and respectfully,


Dave