I am working on Ubuntu 16.04 and trying to use Code::Blocks and wxWidgets. I have compiled wxWidgets 3.0.3 to /opt and compiled Code::Blocks 17.12 using that version of wxWidgets. Code::Blocks is installed to /usr/local. When I generate a wxWidgets project then compile and run, it terminates with status -6 with no obvious signs of creating a window. Looking at the compile messages, it is obviously using the wxWidgets I have in /usr. How can I tell Code::Blocks I want to use the wxWidgets in /opt? Is this likely to be the problem?
I'm afraid I am fairly new to Ubuntu, so apologies if this is an Ubuntu problem.