How to setup enviroment variable?

CodeLite installation/troubleshooting forum
atubar
CodeLite Curious
Posts: 8
Joined: Sat Nov 28, 2009 7:25 pm
Genuine User: Yes
IDE Question: C++
Contact:

How to setup enviroment variable?

Post by atubar »

I hvae installed lstest version of codelite , wxformbuilder and wxWidgets under Linux Mint 8 .
Added plugin : /usr/bin/wxformbuilder
Set enviroment variable: wxWidgets /usr/include/wx-2.8

Then create a GUI Project, build it and results errors below:
/home/roy/CODE/wxForm/gui.h:11:21: error: wx/intl.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:13:23: error: wx/string.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:14:23: error: wx/bitmap.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:15:22: error: wx/image.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:16:21: error: wx/icon.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:17:21: error: wx/menu.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:18:23: error: wx/gdicmn.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:19:21: error: wx/font.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:20:23: error: wx/colour.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:21:25: error: wx/settings.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:22:22: error: wx/sizer.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:23:25: error: wx/statusbr.h: no such file or directory
/home/roy/CODE/wxForm/gui.h:24:22: error: wx/frame.h: no such file or directory

Is there anything that I should do??
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to setup enviroment variable?

Post by eranif »

You need to install the development packages of wxWidgets.

Can you also paste here the *entire* build error?

Eran
Make sure you have read the HOW TO POST thread
atubar
CodeLite Curious
Posts: 8
Joined: Sat Nov 28, 2009 7:25 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to setup enviroment variable?

Post by atubar »

Hello, I'm a fresher from China, so infomations below cotain Chinese charater.
And I wonder that is there a wiki about how to set those plugins and enviroment variables manual.

By the way , I install all latest version of codelite , wxformbuilder and wxWidgets under Linux Mint 8 .
And the project is created by default.

----------Build Started--------
/bin/sh -c '"make" -j 1 -f "wxForm_wsp.mk"'
----------Building project:[ wxForm - Debug ]----------
make[1]: 正在进入目录 `/home/roy/CODE/wxForm'
Warning: No config found to match: /usr/bin/wx-config --cxxflags --unicode=yes --debug=yes
g++ -c "/home/roy/CODE/wxForm/gui.cpp" -g -D__WX__ -o ./Debug/gui.o "-I."
in /usr/lib/wx/config
If you require this configuration, please install the desired
library build. If this is part of an automated configuration
test and no other errors occur, you may safely ignore it.
You may use wx-config --list to see all configs available in
the default prefix.
Warning: No config found to match: /usr/bin/wx-config --debug=yes --libs --unicode=yes
in /usr/lib/wx/config
If you require this configuration, please install the desired
library build. If this is part of an automated configuration
test and no other errors occur, you may safely ignore it.
You may use wx-config --list to see all configs available in
the default prefix.
In file included from /home/roy/CODE/wxForm/gui.cpp:8:
/home/roy/CODE/wxForm/gui.h:11:21: error: wx/intl.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:13:23: error: wx/string.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:14:23: error: wx/bitmap.h: 没有该文件或目录
make[1]:正在离开目录 `/home/roy/CODE/wxForm'
/home/roy/CODE/wxForm/gui.h:15:22: error: wx/image.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:16:21: error: wx/icon.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:17:21: error: wx/menu.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:18:23: error: wx/gdicmn.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:19:21: error: wx/font.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:20:23: error: wx/colour.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:21:25: error: wx/settings.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:22:22: error: wx/sizer.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:23:25: error: wx/statusbr.h: 没有该文件或目录
/home/roy/CODE/wxForm/gui.h:24:22: error: wx/frame.h: 没有该文件或目录
In file included from /home/roy/CODE/wxForm/gui.cpp:8:
/home/roy/CODE/wxForm/gui.h:33: error: expected class-name before ‘{’ token
/home/roy/CODE/wxForm/gui.h:37: error: ISO C++ forbids declaration of ‘wxMenuBar’ with no type
/home/roy/CODE/wxForm/gui.h:37: error: expected ‘;’ before ‘*’ token
/home/roy/CODE/wxForm/gui.h:38: error: ISO C++ forbids declaration of ‘wxMenu’ with no type
/home/roy/CODE/wxForm/gui.h:38: error: expected ‘;’ before ‘*’ token
/home/roy/CODE/wxForm/gui.h:39: error: ISO C++ forbids declaration of ‘wxStatusBar’ with no type
/home/roy/CODE/wxForm/gui.h:39: error: expected ‘;’ before ‘*’ token
/home/roy/CODE/wxForm/gui.h:42: error: ‘wxCloseEvent’ has not been declared
/home/roy/CODE/wxForm/gui.h:43: error: ‘wxCommandEvent’ has not been declared
/home/roy/CODE/wxForm/gui.h:48: error: expected ‘)’ before ‘*’ token
/home/roy/CODE/wxForm/gui.h: In member function ‘virtual void MainFrameBase::OnCloseFrame(int&)’:
/home/roy/CODE/wxForm/gui.h:42: error: request for member ‘Skip’ in ‘event’, which is of non-class type ‘int’
/home/roy/CODE/wxForm/gui.h: In member function ‘virtual void MainFrameBase::OnExitClick(int&)’:
/home/roy/CODE/wxForm/gui.h:43: error: request for member ‘Skip’ in ‘event’, which is of non-class type ‘int’
/home/roy/CODE/wxForm/gui.cpp: At global scope:
/home/roy/CODE/wxForm/gui.cpp:12: error: expected ‘)’ before ‘*’ token
/home/roy/CODE/wxForm/gui.cpp: In destructor ‘MainFrameBase::~MainFrameBase()’:
/home/roy/CODE/wxForm/gui.cpp:43: error: ‘class MainFrameBase’ has no member named ‘Disconnect’
/home/roy/CODE/wxForm/gui.cpp:43: error: ‘wxEVT_CLOSE_WINDOW’ was not declared in this scope
/home/roy/CODE/wxForm/gui.cpp:43: error: ‘wxCloseEventHandler’ was not declared in this scope
/home/roy/CODE/wxForm/gui.cpp:44: error: ‘class MainFrameBase’ has no member named ‘Disconnect’
/home/roy/CODE/wxForm/gui.cpp:44: error: ‘wxID_ANY’ was not declared in this scope
/home/roy/CODE/wxForm/gui.cpp:44: error: ‘wxEVT_COMMAND_MENU_SELECTED’ was not declared in this scope
/home/roy/CODE/wxForm/gui.cpp:44: error: ‘wxCommandEventHandler’ was not declared in this scope
make[1]: *** [Debug/gui.o] error 1
make: *** [All] error 2
----------Build Ended----------
33 errors, 0 warnings
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: How to setup enviroment variable?

Post by DavidGH »

Hi,

You have the standard release version of wxWidgets. However, you're trying to build a debug project, and the correct wx build isn't available.

Have a look at http://codelite.org/LiteEditor/QuickStart, near the bottom, "If so, you need to change the Selected Configuration...".
Alternatively, add the wxGTK debug symbols package.

Regards,

David
atubar
CodeLite Curious
Posts: 8
Joined: Sat Nov 28, 2009 7:25 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to setup enviroment variable?

Post by atubar »

Hello, And Thanks you.
I change the configuration to Release, then it works well. But a shell prompts somthing below:
&warning: GDB: failed to set controlling terminal :\346\223\215\344\275\234^^^^^^^^^

I'm puzzled, how to build the project in debug mode under linux mint?

Other more, I also install codelite under windows. And it works quite welll if I set up a Path enviroment variables of wxwidgets.
If not, warnings come out about that wxwidget***.dll can not be found.
So what is the IDE's enviroment variables in use? Why couldn't it take place of windows enviroment variables??
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to setup enviroment variable?

Post by eranif »

atubar wrote:Why couldn't it take place of windows enviroment variables??
What did u set in the environment variables (from codelite's menu: 'settings -> environment variables')?

It is working pretty well here on all OSs (Mac / Linux and Windows) without the need to set wxWidgets path in the Windows environment variable

Post here the content of the PATH variable as you defined it in codelite
Eran
Make sure you have read the HOW TO POST thread
atubar
CodeLite Curious
Posts: 8
Joined: Sat Nov 28, 2009 7:25 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to setup enviroment variable?

Post by atubar »

Under windows, there are two default enviroment variables in CL local.
They are :
WXWIN D:\wxWidgets-2.8.10
WXCFG gcc_dll\mswu

I delect them, and CL still works well in a simple test. And buliding infos come out below:

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.
g++ -o ./Debug/wxDemo ./Debug/gui.o ./Debug/main.o "-L." -mwindows wx-config Error: wxWidgets hasn't been found installed at 'D:\Program Files'.
g++: wx-config: No such file or directory
g++: Error:: Invalid argument
g++: wxWidgets: No such file or directory
g++: hasn't: No such file or directory
g++: been: No such file or directory
g++: found: No such file or directory
g++: installed: No such file or directory
g++: at: No such file or directory
g++: 'D:\Program: Invalid argument
g++: Files'.: No such file or directory
mingw32-make.exe[1]: *** [Debug/wxDemo] Error 1
mingw32-make.exe: *** [All] Error 2

Are they needed or in use?

Other more, I set a system enviroment variable below:
Path D:\wxWidgets-2.8.10\lib\gcc_dll
If not, programs will prompt that wxmsw28ud_gcc_custom.dll can not be found.

So, can CL enviroment variable take place of system enviroment variable . Because wxWidgets-2.8.10 is referred in both.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: How to setup enviroment variable?

Post by DavidGH »

I change the configuration to Release, then it works well. But a shell prompts somthing below:
&warning: GDB: failed to set controlling terminal :\346\223\215\344\275\234^^^^^^^^^
It's a gdb problem, not a CodeLite one; fortunately it doesn't seem to matter. Just ignore it.
I'm puzzled, how to build the project in debug mode under linux mint?
To do this, you need to have CodeLite find a debug build of wxWidgets when it builds your project (and obviously you also need to return the configuration setting to 'debug').
I build wxGTK from the tarball (e.g. http://sourceforge.net/projects/wxwindo ... 2/download), following the instructions about building in a subdirectory e.g. udb/ for a unicode-debug build. Doing:
../configure --enable-unicode --enable-debug --prefix=$(pwd)
followed by 'make' (you don't need to 'make install') then gets you a 'local' build of wxGTK, which you can use via its 'wx-config' in udb/

Point to the wx debug build while you're creating your project, or to the installed wx release package to test the release version. See the 'Compiler tab' and 'Linker tab' sections of http://codelite.org/LiteEditor/ProjectSettings for an easy way to do this.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to setup enviroment variable?

Post by eranif »

atubar wrote:I delect them
Do you mean: delete?

Dont delete those.

Read the build output: it seems that wx-config cant find any installation on your machine
those environments were pointing to 'D:\wxWidgets-2.8.10' but yet, the error says:
wxWidgets hasn't been found installed at 'D:\Program Files'.
Did you change any settings?

If you change anything from the default installation, please specify them here, since we cant guess what you did.

Also:
Dont install wxWidgets under paths with spaces.
atubar wrote:Path D:\wxWidgets-2.8.10\lib\gcc_dll
This is really bad - you simply override the PATH environment variable, you should set it to:

Code: Select all

PATH $(PATH);D:\wxWidgets-2.8.10\lib\gcc_dll
- so your path is appended to the current value of PATH

BTW: Windows *is* case sensitive when it comes to environment variables, it should be PATH in upper-case

Eran
Make sure you have read the HOW TO POST thread
atubar
CodeLite Curious
Posts: 8
Joined: Sat Nov 28, 2009 7:25 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to setup enviroment variable?

Post by atubar »

Thanks to both.
After some simple tests, I reinstate all enviroment variables.
CL is a wonderful IDE, I will follow it with interest.
Post Reply