| LukeJM | any c programmers? | 02:52 |
|---|---|---|
| LukeJM | jest need to know which packages I need to install to get the compiler to work correctly | 02:52 |
| LukeJM | seems to work fine when I compile "hello world" but then running it does nothing | 02:53 |
| persia | I'd recommend starting with build-essential. That ought be everything you expect. | 02:53 |
| LukeJM | ok, got that | 02:53 |
| LukeJM | having some other problem then | 02:53 |
| LukeJM | the program compiles ok, but doesn't do anything when I run it... its only supposed to printf ("hello world!\n"); | 02:54 |
| LukeJM | thoughts? | 02:58 |
| persia | Dunno. You might try stepping through it with a debugger, or looking at strace output. It's probably a bug. | 03:00 |
| LukeJM | can't see how... its only 4 lines... and I've compared it to the book | 03:01 |
| LukeJM | #include <stdio.h> | 03:01 |
| LukeJM | int main (void) | 03:01 |
| LukeJM | { | 03:01 |
| LukeJM | printf ("hello world\n"); | 03:01 |
| LukeJM | return o; | 03:01 |
| LukeJM | } | 03:01 |
| jrib | return o? | 03:02 |
| jrib | erm | 03:02 |
| LukeJM | errr... 0 | 03:02 |
| LukeJM | THAT was a typo... :) | 03:02 |
| LukeJM | its right in my source | 03:03 |
| jrib | LukeJM: should work. Why don't you pastebin the actual file and your terminal session LukeJM? | 03:04 |
| LukeJM | lucas@lucas-laptop:~$ gcc -Wall test.c -o test | 03:09 |
| LukeJM | lucas@lucas-laptop:~$ test | 03:09 |
| LukeJM | lucas@lucas-laptop:~$ | 03:09 |
| jrib | heh | 03:09 |
| jrib | ./test | 03:09 |
| LukeJM | oh you gotta be kidding me | 03:09 |
| LukeJM | *shakes head* | 03:10 |
| jrib | yeah, . isn't in your PATH, so you're calling some shell builtin probably | 03:10 |
| LukeJM | works like a charm... :) | 03:10 |
| persia | That, or /usr/bin/test | 03:10 |
| LukeJM | sheesh... gotta be carefull what I name stuff I guess | 03:11 |
| persia | which ${potential-name} is a good thing to run first :) | 03:11 |
| LukeJM | so even though i'm in the same directory as the executable I gotta tack the "./" on there? | 03:12 |
| persia | Or add ./ to your $PATH | 03:12 |
| persia | (note that this is dangerous, as you never know what might be executed, depending on where you are) | 03:12 |
| LukeJM | weird... I didn't have that problem when I was running it at school | 03:13 |
| jrib | LukeJM: what distro? | 03:13 |
| persia | LukeJM, echo $PATH at home at at school : they might be different. | 03:13 |
| LukeJM | they're on ubuntu as well... | 03:13 |
| jrib | sysadmin probably added it | 03:13 |
| LukeJM | huh.... learn something new every day... thought I was going crazy | 03:14 |
| persia | silly sysadmin : someone's going to be a wrapper around ls and nab the box one day. | 03:14 |
| persia | s/be/put a/ | 03:14 |
| LukeJM | well good... now I can finally bang out this temp conversion program assignment | 03:16 |
| * persia idly wonders if linking against a conversion library would be an acceptable solution | 03:17 | |
| LukeJM | lol, i'm guessing no | 03:18 |
| persia | I also :) | 03:18 |
| LukeJM | thanks for the help jrib, persia... | 03:18 |
| === merriam_ is now known as merriam | ||
| jrib | np | 03: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 | ||
| compr00t | test | 21:51 |
| compr00t | sry | 21:51 |
| kaafmim | :-X | 22:40 |
| Ljudkort_ | :* | 22:44 |
| kaafmim | :-D | 22:45 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!