Nothing Works 0.o

CodeLite installation/troubleshooting forum
tlchack5
CodeLite Curious
Posts: 7
Joined: Mon Nov 15, 2010 9:33 am
Genuine User: Yes
IDE Question: C++
Contact:

Nothing Works 0.o

Post by tlchack5 »

I'm running a fresh install of Codelite (from the codelite-mingw-wx bundled installer) and for some reason nothing works. Whenever I try to compile a hello world program that works just fine in MSVS, the cmd prompt pops up and says "press any key to continue..." like it reached the end of the program, but it never executes any of the commands. If I try to include any of the wx libraries it gives compile errors saying it cannot find the libraries.

I have tried just about everything and can't get the program to work... please help =(
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Nothing Works 0.o

Post by eranif »

tlchack5 wrote:Nothing Works 0.o
then you are definitely doing something wrong ;)
tlchack5 wrote:cmd prompt pops up and says "press any key to continue..."
What prompt? there is no prompt when building... only when executing the program. Did you build it?

Please post the build output of your program.
How did you create your project?


Also state your codelite version, windows version.
Read this for how/what to post:
http://codelite.org/forum/viewtopic.php?f=3&t=804

Eran
Make sure you have read the HOW TO POST thread
tlchack5
CodeLite Curious
Posts: 7
Joined: Mon Nov 15, 2010 9:33 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Nothing Works 0.o

Post by tlchack5 »

Sorry, I did leave a lot of information out.

My Codelite version is: v2.6.0.4189
(I used the codelite-mingw-wx bundle to install)
My Windows version is: 32-bit Windows Vista Home Premium Service Pack 1

You are right, I am running the program not building. When I build the project it says:

Code: Select all

----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe"  -j 2 -f "Hello World_wsp.mk""
----------Building project:[ HelloWorld - Release ]----------

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
mingw32-make.exe[1]: Entering directory `C:/Users/User/Desktop/Random/C++ Projects/Hello World'
g++ -c  "C:/Users/User/Desktop/Random/C++ Projects/Hello World/main.cpp" -O2 wx-config Error: No valid setup.h of wxWidgets has been found at location: C:\Users\User\Desktop\WxWidgets Source\wxWidgets-2.8.11\lib\gcc_dll\mswu\wx\setup.h -D__WX__  -o ./Release/main.o "-I." 
C:/Users/User/Desktop/Random/C++ Projects/Hello World/main.cpp: In function 'int main()':
C:/Users/User/Desktop/Random/C++ Projects/Hello World/main.cpp:56: error: expected ';' before 'result'
g++: wx-config: No such file or directory
g++: Error:: Invalid argument
g++: No: No such file or directory
g++: valid: No such file or directory
g++: setup.h: No such file or directory
g++: of: No such file or directory
g++: wxWidgets: No such file or directory
g++: has: No such file or directory
g++: been: No such file or directory
g++: found: No such file or directory
g++: at: No such file or directory
g++: location:: Invalid argument
g++: C:\Users\User\Desktop\WxWidgets: No such file or directory
g++: Source\wxWidgets-2.8.11\lib\gcc_dll\mswu\wx\setup.h: No such file or directory
mingw32-make.exe[1]: *** [Release/main.o] Error 1
mingw32-make.exe: *** [All] Error 2
mingw32-make.exe[1]: Leaving directory `C:/Users/User/Desktop/Random/C++ Projects/Hello World'
----------Build Ended----------
1 errors, 0 warnings
If it helps here is the program I am compiling:

Code: Select all

#include <iostream>
using namespace std;

int factorial(int f);
int combination(int x, int y);
int permutation(int x, int y);

int main(){

	bool loop = 1;

	while(loop==1){

		int selection = 0;

		cout << "Enter 1 For Factorial, Enter 2 for Combination, Enter 3 for Permutation: ";
		cin >> selection;

		
		int result = 0;

		if(selection==2|selection==3)
		{
			int x = 0;
			int y = 0;

			if(selection==2)
			{
				cout << "\nEnter _C: ";
				cin >> x;

				cout << "\nEnter C_: ";
				cin >> y;
				result = combination(x,y);
			}

			if(selection==3)
			{
				cout << "\nEnter _P: ";
				cin >> x;

				cout << "\nEnter P_: ";
				cin >> y;

				result = permutation(x,y);
			}

		}

		if(selection==1)
		{
			int f = 0;
			
			cout << "Enter factorial: ";
			cin >> f
			result = factorial(f);
		}

		cout << result << "\n\n";
	}
}

int factorial(int f){

	
	int result = f;

	f= f--;

	for(int i = f; i > 0; i--)
	{
		result = result*i;
	}
	
	return result;

}

int combination(int x, int y)
{
	int result = (factorial(x))/(factorial(y)*factorial(x-y));
	return result;
}

int permutation(int x, int y)
{
	int result = (factorial(x))/factorial(x-y);
	return result;
}
tlchack5
CodeLite Curious
Posts: 7
Joined: Mon Nov 15, 2010 9:33 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Nothing Works 0.o

Post by tlchack5 »

Okay, after posting I noticed where the problem is but I don't know how to fix it. It automatically installed wxWidgets to the desktop at WxWidgets Source. There is a space in the name which is confusing the compiler (probably a lack of quatation marks around the path name), where can I set that variable in codelite?

I found where the variable is (settings->environment variables) and replaced WXWIN=C:\Users\User\Desktop\WxWidgets Source\wxWidgets-2.8.11 with WXWIN="C:\Users\User\Desktop\WxWidgets Source\wxWidgets-2.8.11" and now when I build my project I get:

Code: Select all

----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe"  -j 2 -f "Hello World_wsp.mk""
----------Building project:[ HelloWorld - Release ]----------

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.
mingw32-make.exe[1]: Entering directory `C:/Users/User/Desktop/Random/C++ Projects/Hello World'
g++ -o ./Release/HelloWorld ./Release/main.o  "-L."   -s wx-config Error: wxWidgets hasn't been found installed at '"C:\Users\User\Desktop\WxWidgets Source\wxWidgets-2.8.11"'.
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++: 'C:\Users\User\Desktop\WxWidgets Source\wxWidgets-2.8.11'.: Invalid argument
mingw32-make.exe[1]: *** [Release/HelloWorld] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Users/User/Desktop/Random/C++ Projects/Hello World'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
0 errors, 0 warnings
Also I forgot a ";" hehe :oops:
Last edited by tlchack5 on Tue Nov 16, 2010 12:37 am, edited 1 time in total.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Nothing Works 0.o

Post by eranif »

- Which project did u use for creating your project?
- What is the content of your environment variables inside codelite ? (Settings | Environment Variables)

Eran
Make sure you have read the HOW TO POST thread
tlchack5
CodeLite Curious
Posts: 7
Joined: Mon Nov 15, 2010 9:33 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Nothing Works 0.o

Post by tlchack5 »

eranif wrote:- Which project did u use for creating your project?
I used an empty project. using a Simple executable (wxWidgets enabled) if I remember right
- What is the content of your environment variables inside codelite ? (Settings | Environment Variables)

Code: Select all

CodeLiteDir="C:\Program Files\CodeLite"
WXWIN="C:\Users\User\Desktop\WxWidgets Source\wxWidgets-2.8.11"
PATH=$(WXWIN)\lib\gcc_dll;$(PATH)
WXCFG=gcc_dll\mswu
UNIT_TEST_PP_SRC_DIR=C:\UnitTest++-1.3
BTW I updated the previous post before I noticed you had replied.
tlchack5
CodeLite Curious
Posts: 7
Joined: Mon Nov 15, 2010 9:33 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Nothing Works 0.o

Post by tlchack5 »

When I don't use wxwidgets, the code works just fine. However the main reason I am using codelite is to use wxwidgets...
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Nothing Works 0.o

Post by eranif »

My guess is to install wx-widgets in a dir without space, since it looks like wx-config doees not like it...
Eran
Make sure you have read the HOW TO POST thread
tlchack5
CodeLite Curious
Posts: 7
Joined: Mon Nov 15, 2010 9:33 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Nothing Works 0.o

Post by tlchack5 »

eranif wrote:My guess is to install wx-widgets in a dir without space, since it looks like wx-config doees not like it...
Eran
Okay, did that..

Code: Select all

CodeLiteDir=C:\Program Files\CodeLite
WXWIN=C:\Users\User\Desktop\WxWidgets_Source\wxWidgets-2.8.11
PATH=$(WXWIN)\lib\gcc_dll;$(PATH)
WXCFG=gcc_dll\mswu
UNIT_TEST_PP_SRC_DIR=C:\UnitTest++-1.3
..and It's still having issues.

Code: Select all

----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe"  -j 2 -f "Hello World_wsp.mk""
----------Building project:[ HelloWorld - Release ]----------

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
mingw32-make.exe[1]: Entering directory `C:/Users/User/Desktop/Random/C++ Projects/Hello World'
g++ -o ./Release/HelloWorld ./Release/main.o  "-L."   -s wx-config Error: No valid setup.h of wxWidgets has been found at location: C:\Users\User\Desktop\WxWidgets_Source\wxWidgets-2.8.11\lib\gcc_dll\mswu\wx\setup.h
g++: wx-config: No such file or directory
g++: Error:: Invalid argument
g++: No: No such file or directory
g++: valid: No such file or directory
g++: setup.h: No such file or directory
g++: of: No such file or directory
g++: wxWidgets: No such file or directory
g++: has: No such file or directory
g++: been: No such file or directory
g++: found: No such file or directory
g++: at: No such file or directory
g++: location:: Invalid argument
g++: C:\Users\User\Desktop\WxWidgets_Source\wxWidgets-2.8.11\lib\gcc_dll\mswu\wx\setup.h: No such file or directory
mingw32-make.exe[1]: *** [Release/HelloWorld] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Users/User/Desktop/Random/C++ Projects/Hello World'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
0 errors, 0 warnings
It is searching for \lib\gcc_dll\mswu\wx\setup.h which does not exist.
I didn't install wxwidgets, it was installed via the codelite package.
tlchack5
CodeLite Curious
Posts: 7
Joined: Mon Nov 15, 2010 9:33 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Nothing Works 0.o

Post by tlchack5 »

I have decided to abandon WxWidgets and migrate to QT. :geek:
Post Reply