Adding a permanent path in Linux Mint

closed account (EwCjE3v7)
Wanted to add PATH=$PATH:/usr/include/wx-2.8/wx but don't know how. Any help?

I've tried making a ~/.bashrc file but no luck. Any help?
I assume you are using bash? The .bashrc file should do it. Are there any other calls to other utilities or programs after the PATH=${PATH}:/usr/include/wx-2.8/wx statement that could be resetting your path?
closed account (EwCjE3v7)
When I type is $PATH I get the following output

$PATH
bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/include/wx-3.0-unofficial: No such file or directory


And when I try to run a program with a wx file, it says it cannot be found

#include <wx/wxprec>
Last edited on
To view the contents of a variable, you can use the echo command:

1
2
3

echo $PATH


Notice that at the end of your path, you see "No such file or directory". That's because your shell interpreted what you typed ($PATH) as a command.

BTW: You have several duplicates in your PATH string.

What program are you trying to run? What is the exact error message?
closed account (EwCjE3v7)
http://docs.wxwidgets.org/trunk/overview_helloworld.html

Thats the program I'm trying to run.


Testing.cpp:3:23: fatal error: wx/wxprec.h: No such file or directory
 #include <wx/wxprec.h>
                       ^
compilation terminated.


And thats the eror I get when compiling with g++.

How would I also remove the duplicates?
The compiler does not look header files from the PATH. This is not a path issue at all.

You are a bit inconsistent, because you mention two different directories:
/usr/include/wx-3.0-unofficial
/usr/include/wx-2.8


Did you install the wx with Mint's package manager? I would expect a managed package to add itself to compiler's default include locations.

If not, GCC has the -I option.
closed account (EwCjE3v7)
After compiling the program with the following

g++ Testing.cpp -o t -std=c++11 -I /usr/include/wx-3.0-unofficial/


And the output is


In file included from /usr/include/wx-3.0-unofficial/wx/defs.h:27:0,
                 from /usr/include/wx-3.0-unofficial/wx/wxprec.h:12,
                 from Testing.cpp:3:
/usr/include/wx-3.0-unofficial/wx/platform.h:183:22: fatal error: wx/setup.h: No such file or directory
 #include "wx/setup.h"
                      ^
compilation terminated.



wxprec includes setup.h but it can't find that.

Thanks for the help btw :)
Google with "wx/setup.h" tells that setup.h is usually elsewhere (so that you can have many versions).

Google with "wx Linux Mint" finds stuff like http://forums.linuxmint.com/viewtopic.php?f=47&t=76829

The question is still: How did you install wx? Some "apt-get install" or what?
closed account (EwCjE3v7)
I installed it by the following commands from their website.



sudo apt-add-repository 'deb http://repos.codelite.org/wx3.0.2/ubuntu/ trusty universe'

apt-get update

apt-get install libwxbase3.0-0-unofficial \
libwxbase3.0-dev \
libwxgtk3.0-0-unofficial \
libwxgtk3.0-dev \
wx3.0-headers \
wx-common \
libwxbase3.0-dbg \
libwxgtk3.0-dbg \
wx3.0-i18n \
wx3.0-examples \
wx3.0-doc
Perhaps this will help: https://wiki.wxwidgets.org/Wx-Config
closed account (EwCjE3v7)
Thank you norm b, that worked :).

Thanks to keskiverto for all his help to.

g++ `wx-config --cxxflags` -o out *.cpp `wx-config --libs`
Topic archived. No new replies allowed.