Hello world program

General questions regarding the usage of CodeLite
pablomagno
CodeLite Curious
Posts: 4
Joined: Tue Nov 12, 2013 8:26 pm
Genuine User: Yes
IDE Question: gcc
Contact:

Hello world program

Post by pablomagno »

Hello sirs

I was installed codelite and I write the helloworld stupid program
but I don see (the Hello world sentence in the screen)
I only see "Please any key to continue"

I fell an idiot.

I am 52 years old learn c in the past and not remember how to program

#include <stdio.h>

int main(int argc, char **argv);
{


printf("hello world\n");
return 0;
}

this is a program but I don't can see the hello world sentence.

if anyone can tell me where is my mistake Pleaseee.
pavel.iqx
CodeLite Enthusiast
Posts: 19
Joined: Wed Jun 26, 2013 12:46 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Hello world program

Post by pavel.iqx »

what about this:
int main(int argc, char **argv);
?
i can't even compile it with semicolon there
Debian GNU/Linux 7.3 (wheezy) x64; CodeLite 5.4 from repo & CodeLite self-compiled from git HEAD
pablomagno
CodeLite Curious
Posts: 4
Joined: Tue Nov 12, 2013 8:26 pm
Genuine User: Yes
IDE Question: gcc
Contact:

Re: Hello world program

Post by pablomagno »

Hi Pavel

I delete the " ;"

but the program not write the sentence "Hello World"
pavel.iqx
CodeLite Enthusiast
Posts: 19
Joined: Wed Jun 26, 2013 12:46 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Hello world program

Post by pavel.iqx »

Debian GNU/Linux 7.3 (wheezy) x64; CodeLite 5.4 from repo & CodeLite self-compiled from git HEAD
pablomagno
CodeLite Curious
Posts: 4
Joined: Tue Nov 12, 2013 8:26 pm
Genuine User: Yes
IDE Question: gcc
Contact:

Re: Hello world program

Post by pablomagno »

C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 2 -e -f Makefile"
The current directory is invalid.
0 errors, 0 warnings

this is that I recive

I was do exactly whats write in the link that you send me.

whitout success.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Hello world program

Post by eranif »

pablomagno wrote:C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 2 -e -f Makefile"
The current directory is invalid.
0 errors, 0 warnings

this is that I recive

I was do exactly whats write in the link that you send me.

whitout success.
Make sure you create the workspace in a directory with write permissions

Eran
Make sure you have read the HOW TO POST thread
Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Hello world program

Post by Gibbon1 »

I saw that, 'directory is invalid' recently when the project wasn't under the workspace in the directory tree.

I'd suggest, starting over from scratch and try again.

Also try running the executable in a dos shell otherwise the hello world program will run, print hello world, and then exit and the window closes before you can see the result.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Hello world program

Post by eranif »

Gibbon1 wrote:Also try running the executable in a dos shell otherwise the hello world program will run, print hello world, and then exit and the window closes before you can see the result.
Not necessarily true - open your project settings and tick the little check box in the 'General' page that says ' Pause when execution ends'

Eran
Make sure you have read the HOW TO POST thread
pablomagno
CodeLite Curious
Posts: 4
Joined: Tue Nov 12, 2013 8:26 pm
Genuine User: Yes
IDE Question: gcc
Contact:

Re: Hello world program

Post by pablomagno »

Hi thank's you for the help.

the solution was uninstall the codelite program
and reinstall this in a diferent directory.
I was install this in the c:\codelite and this is work well!

when I install in the directory C:\program files(x86) the program was not run.

Best regards,

Pablo
User avatar
Jarod42
CodeLite Expert
Posts: 240
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Hello world program

Post by Jarod42 »

The problem is not where you install codelite,
but where you create source files, workspace, and outputdir...

You can (should) create your files outside of the codelite directory.
Post Reply