Page 1 of 1

defining environment variables (path)

Posted: Wed Jan 16, 2013 10:31 am
by said_hacked_agent
If you know how to solve this problem, please, I implore you, help ME!
I have removed Windows XP from my machine and installed Linux mint 13 (debian x86). Now I want to use the Codelite IDE as I am learning C++. the compiler I am using is g++-4.6. Works great via Terminal:

Code: Select all

said@said_home ~ $ g++ R.cpp
said@said_home ~ $ g++ R.cpp -o ./romb
said@said_home ~ $ ./romb
Romb necha satrdan iborat(faqat toq son kiriting):
However, I tried codelite 4.1.5770-1.oneiric (IDE), creating new workspace and copy-pasting the source code. then pressed F7...
the only thing that I got was:

Code: Select all

----------Build Started--------
/bin/sh -c '"" -e  -j 1 -f "R_wsp.mk"'
/bin/sh: 1: : Permission denied
----------Build Ended----------
0 errors, 0 warnings
then I realized that I did not set the build tools, system variables, debugging path. I changed them several times using several directories (/usr/bin/g++ and etc.).
Please, help me! I want the codelite to work with g++ and compile my sources. which path should I set,..., what should I do to make the compiler work with the codelite??? :cry: (I wasted 6 hours without any results)

Re: defining environment variables (path)

Posted: Wed Jan 16, 2013 11:46 am
by eranif
said_hacked_agent wrote:/bin/sh -c '"" -e  -j 1 -f "R_wsp.mk"'
It looks like you modified various options in codelite.

Go to:

Settings -> build settings -> build systems (tab)

Set the "Build tool" to 'make'

Make sure you have basic build tools installed:

Code: Select all

sudo apt-get install build-essential
Eran

Re: defining environment variables (path)

Posted: Wed Jan 16, 2013 1:02 pm
by said_hacked_agent
eranif wrote:Settings -> build settings -> build systems (tab)

Set the "Build tool" to 'make'
thanks, now the projects which I wrote using Windows XP borland c++ are working and compiling. But, I didn't understand why this GNU compiler has no some directories (I used GNU compiler with borland C++). for example, in my source the compiler says this:

Code: Select all

g++  -c  "/home/said/sinabkor/test/test2/main.cpp" -g -O0 -Wall  -o ./Debug/main.o -I. -I. 
/home/said/sinabkor/test/test2/main.cpp:3:16: fatal error: [b]time[/b]: No such file or directory
/home/said/sinabkor/test/test2/main.cpp:2:18: fatal error: [b]stdlib[/b]: No such file or directory
the source is:
#include <iostream>
#include <stdlib>
#include <time>
using namespace std;
int b,c,l;
void ok(void)
{ int h;
srand(time(NULL));
h=rand()%5;
Did I miss some new features of C++? I suppose the source-code written 3 years ago should be compiled in our days also. which directories should I use instead of <stdlib> and <time>?
debugger is not working! when F5 is pressed, Codelite says
Failed to locate gdb! at 'gdb'
.
I entered Settings->Debugger settings->general{tab} "the debugging path" was empty.
my next question is: how to make the debugger work? :roll: (Thanks!!!)

Re: defining environment variables (path)

Posted: Wed Jan 16, 2013 1:12 pm
by eranif
said_hacked_agent wrote:#include <stdlib>
#include <time>
These are not standard C++ headers.

You should use either:

Code: Select all

#include <cstdlib>
#include <time.h>
or

Code: Select all

#include <stdlib.h>
#include <time.h>
Note that codelite's is not a C++ forum
Eran

Re: defining environment variables (path)

Posted: Wed Jan 16, 2013 1:25 pm
by said_hacked_agent
thanks!!! ok, only codelite, not C++!
and what about debugging path on codelite? I am not able to use debugger as the path was not defined. how to make the debugger work?

Re: defining environment variables (path)

Posted: Wed Jan 16, 2013 9:54 pm
by eranif
See this post for providing more information so we can help you:

HOT TO POST

Eran

Re: defining environment variables (path)

Posted: Fri Jan 18, 2013 10:04 am
by said_hacked_agent
Debugger is not working! on Linux mint 13 (debian) (using g++ 4.6.3-1 compiler) when F5 is
pressed, Codelite v4.1.5770 says
Failed to locate gdb! at 'gdb'

I entered Settings->Debugger settings-
>general{tab} "the debugging path" was
empty.
my next question is: how to make the
debugger work? (Thanks!!!)

Re: defining environment variables (path)

Posted: Fri Jan 18, 2013 12:31 pm
by eranif
eranif wrote:See this post for providing more information so we can help you:
HOT TO POST
Eran
Please provide the debugger log (as described in the "HOT TO POST" thread)

Eran