/srv/irclogs.ubuntu.com/2008/10/29/#ubuntu-classroom.txt

LukeJMany c programmers?02:52
LukeJMjest need to know which packages I need to install to get the compiler to work correctly02:52
LukeJMseems to work fine when I compile "hello world" but then running it does nothing02:53
persiaI'd recommend starting with build-essential.  That ought be everything you expect.02:53
LukeJMok, got that02:53
LukeJMhaving some other problem then02:53
LukeJMthe program compiles ok, but doesn't do anything when I run it... its only supposed to printf ("hello world!\n");02:54
LukeJMthoughts?02:58
persiaDunno.  You might try stepping through it with a debugger, or looking at strace output.  It's probably a bug.03:00
LukeJMcan't see how... its only 4 lines... and I've compared it to the book03:01
LukeJM#include <stdio.h>03:01
LukeJMint main (void)03:01
LukeJM{03:01
LukeJMprintf ("hello world\n");03:01
LukeJMreturn o;03:01
LukeJM}03:01
jribreturn o?03:02
jriberm03:02
LukeJMerrr... 003:02
LukeJMTHAT was a typo... :)03:02
LukeJMits right in my source03:03
jribLukeJM: should work.  Why don't you pastebin the actual file and your terminal session LukeJM?03:04
LukeJMlucas@lucas-laptop:~$ gcc -Wall test.c -o test03:09
LukeJMlucas@lucas-laptop:~$ test03:09
LukeJMlucas@lucas-laptop:~$03:09
jribheh03:09
jrib./test03:09
LukeJMoh you gotta be kidding me03:09
LukeJM*shakes head*03:10
jribyeah, . isn't in your PATH, so you're calling some shell builtin probably03:10
LukeJMworks like a charm... :)03:10
persiaThat, or /usr/bin/test03:10
LukeJMsheesh... gotta be carefull what I name stuff I guess03:11
persiawhich ${potential-name} is a good thing to run first :)03:11
LukeJMso even though i'm in the same directory as the executable I gotta tack the "./" on there?03:12
persiaOr add ./ to your $PATH03:12
persia(note that this is dangerous, as you never know what might be executed, depending on where you are)03:12
LukeJMweird... I didn't have that problem when I was running it at school03:13
jribLukeJM: what distro?03:13
persiaLukeJM, echo $PATH at home at at school : they might be different.03:13
LukeJMthey're on ubuntu as well...03:13
jribsysadmin probably added it03:13
LukeJMhuh.... learn something new every day... thought I was going crazy03:14
persiasilly sysadmin : someone's going to be a wrapper around ls and nab the box one day.03:14
persias/be/put a/03:14
LukeJMwell good... now I can finally bang out this temp conversion program assignment03:16
* persia idly wonders if linking against a conversion library would be an acceptable solution03:17
LukeJMlol, i'm guessing no03:18
persiaI also :)03:18
LukeJMthanks for the help jrib, persia...03:18
=== merriam_ is now known as merriam
jribnp03:19
=== riot_le_ is now known as riot_le
=== LjL-Temp is now known as LjL
=== LjL-Temp is now known as LjL
=== pleia2 changed the topic of #ubuntu-classroom to: Ubuntu Classroom || https://wiki.ubuntu.com/Classroom || https://lists.ubuntu.com/mailman/listinfo/Ubuntu-classroom || Ubuntu Open Week, Mon 3 Nov - Fri 7 Nov! Session details here: https://wiki.ubuntu.com/UbuntuOpenWeek
=== daithif is now known as daithif_
=== daithif_ is now known as daithif
compr00ttest21:51
compr00tsry21:51
kaafmim:-X22:40
Ljudkort_:*22:44
kaafmim:-D22:45

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!