Newbie question: Codelite does not run my programs anymore

CodeLite installation/troubleshooting forum
Power-Paul
CodeLite Curious
Posts: 4
Joined: Sun Jun 06, 2010 2:45 pm
Genuine User: Yes
IDE Question: C++
Contact:

Newbie question: Codelite does not run my programs anymore

Post by Power-Paul »

Hi,

I am Using Codelite 2.5.2.4031 in Ubuntu 9.10.

I'm not sure when exactly my problem started (maybe when I started writing programs that included more than just the stdio.h), but when I try to run my programs now, I always get the following:

Code: Select all

/usr/bin/codelite_exec: 22: ./aufg36b: not found
(this was when I was trying to run something I named aufg36b).

Hoping for your help,

Paul
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Newbie question: Codelite does not run my programs anymore

Post by eranif »

Please install from the *site* and not from Synaptic. The Ubuntu version installed from Synaptic is broken and missing the codelite_exec script.

Uninstall codelite, and install it from here:

For 32 Bit:
https://sourceforge.net/projects/codeli ... b/download

For 64 bit:
https://sourceforge.net/projects/codeli ... b/download

Once downloaded, install it like this:

Code: Select all

sudo dpkg -i /path/to/deb/file
Eran
Make sure you have read the HOW TO POST thread
Power-Paul
CodeLite Curious
Posts: 4
Joined: Sun Jun 06, 2010 2:45 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Newbie question: Codelite does not run my programs anymore

Post by Power-Paul »

Hi,

I just downloaded the package You linked, and installed it with the ubuntu package installer (that was because I did not quite get the way you told me to install it by terminal), but the problem remained.

Shall I retry installing it by terminal?
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Newbie question: Codelite does not run my programs anymore

Post by eranif »

Power-Paul wrote:Shall I retry installing it by terminal?
Yes. Install it using the terminal command line.

Eran
Make sure you have read the HOW TO POST thread
Power-Paul
CodeLite Curious
Posts: 4
Joined: Sun Jun 06, 2010 2:45 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Newbie question: Codelite does not run my programs anymore

Post by Power-Paul »

I uninstalled and installed it again by using the terminal command line as You told me, but the problem remained :-(

It seems to appear always when I try to include some header files like string.h or math.h.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Newbie question: Codelite does not run my programs anymore

Post by eranif »

Did you compile your project?
Can you paste here the output of your build command? (copy paste it from the 'Build' Window)

Eran
Make sure you have read the HOW TO POST thread
Power-Paul
CodeLite Curious
Posts: 4
Joined: Sun Jun 06, 2010 2:45 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Newbie question: Codelite does not run my programs anymore

Post by Power-Paul »

Hi,

Here's the output of the 'build' command:
----------Build Started--------
/bin/sh -c '"make" -j 4 -f "test_wsp.mk"'
----------Building project:[ test2 - Debug ]----------
make[1]: Betrete Verzeichnis '/home/paul/.codelite/test'
make[1]: Verlasse Verzeichnis '/home/paul/.codelite/test'
make[1]: Betrete Verzeichnis '/home/paul/.codelite/test'
gcc -c "/home/paul/.codelite/test/main.c" -g -o ./Debug/main.o "-I." "-I."
gcc -o ./Debug/test2 ./Debug/main.o "-L."
./Debug/main.o: In function `function':
/home/paul/.codelite/test/main.c:8: undefined reference to `exp'
collect2: ld returned 1 exit status
make[1]: *** [Debug/test2] Fehler 1
make[1]: Verlasse Verzeichnis '/home/paul/.codelite/test'
make: *** [All] Fehler 2
----------Build Ended----------
0 errors, 0 warnings
and here (if that might be helpful) the program:

Code: Select all

#include <stdio.h>
#include <math.h>

double function(double x)
{
	double f;
	
	f=(1/(x*x))*exp(-x*x);
	
	return f;
}

void clr()
{
	int i;
	for(i=0; i<=25; i++)
	printf("\n");
}

void main()
{
	int i, n, erg, eing;
	double sum=0.0, start, ende, inter, zw, x, f;
	
	do{
		
	printf("\n\tI N T E G R A T I O N\n");
	printf("\nBitte Startwert, Endwert und Anzahl der Schritte eingeben:\nStartwert:\n");
	scanf("%lf", &start);
	printf("\nEndwert:\n");
	scanf("%lf", &ende);
	printf("\nAnzahl Schritte:\n");
	scanf("%i", &n);
	printf("\nZwischenergebnisse alle ... Schritte anzeigen:\n");
	scanf("%i", &erg);
	
	inter=(ende-start)/n;
		
	for(i=0; i<n; i++)
	{
		x=start+i*inter;
		
		f=function(x);
		
		zw=inter/3*f;
		
		if(i!=0 && i!=(n-1))
		{
			if(i%2)
				zw=zw*4;
			else
				zw=zw*2;
		}
		
		sum+=zw;
		
		if(!(i%erg))
		printf("\nAnzahl Schritte: %i \nZwischensumme: %.1lf \nx: %.1lf \nFunktionswert; %.1lf\n\n", i, sum, x, f);
	}
	printf("\nAnzahl Schritte: %i \nSumme: %.1lf \nx: %.1lf \nFunktionswert; %.1lf\n\n", i, sum, x, f);
	printf("\n\nZum Beenden '0' eingeben, zum Fortsetzen beliebeige Zahl.");
	scanf("%i", &eing);
	clr();
	}
	while(eing!=0);
}
By the way, thanks a lot for your help.

Paul
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Newbie question: Codelite does not run my programs anymore

Post by eranif »

codelite does not run your program, because there is nothing to run.
your code does not link successfully, fix it and then codelite will be able to run it

Eran
Make sure you have read the HOW TO POST thread
Post Reply