Author Topic: How do I use a specific wxWidgets directory  (Read 2668 times)

Offline Flowers

  • Single posting newcomer
  • *
  • Posts: 6
How do I use a specific wxWidgets directory
« on: February 18, 2018, 10:16:14 am »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How do I use a specific wxWidgets directory
« Reply #1 on: February 18, 2018, 10:35:36 am »
Search for `wx-config ...` in the project build options and replace them with the full path to your wx-config version.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Flowers

  • Single posting newcomer
  • *
  • Posts: 6
Re: How do I use a specific wxWidgets directory
« Reply #2 on: February 18, 2018, 03:20:16 pm »
Thank you. That has solved it and I have now compiled and run my first wxWidgets program in Code::Blocks.
Is there any way I can set my directory as the default when creating a new project?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: How do I use a specific wxWidgets directory
« Reply #3 on: February 18, 2018, 03:30:27 pm »
I would use update-alternatives instead of editing the project path to wx-config.

http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Linux#Checking_the_presence_of_libwxGTK_library

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org