![]() ![]() |
Sep 22 2004, 02:40 PM
Post
#1
|
|
![]() Head Of UAC Security Group: Moderators Posts: 473 Joined: 11-November 03 Member No.: 676 ![]() |
Hi. I can't seem to program in linux. Here's a Hello World program I tried to make:
#include <iostream> #include <sstream> //not sure if i need that though using std::cout; int main() { cout << "Hello World.\n"; return 0; } then I tried to compile like this: g++ main.cpp -o main But I always get a warning No newline at End of File. WTF is going on!? Help me please!! |
|
|
|
Sep 22 2004, 06:11 PM
Post
#2
|
|
![]() Boss, my code's compiling (xkcd) Group: Admins Posts: 10,440 Joined: 19-September 01 Member No.: 1 ![]() |
Looks alright to me. I'm thinking it could be a problem with the GCC libraries. Which distro are you running it on, and how did you install GCC?
-------------------- ![]() ![]() Things that I don't suck at: Photography (flickr, JPG Mag), "Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com |
|
|
|
Sep 23 2004, 12:50 PM
Post
#3
|
|
![]() Head Of UAC Security Group: Moderators Posts: 473 Joined: 11-November 03 Member No.: 676 ![]() |
I'm using Slackware Linux 10. I had it automatically install all the necessary packages in the beginning. I hate linux right now.
|
|
|
|
Oct 11 2004, 06:53 PM
Post
#4
|
|
![]() Full Member ![]() Group: Members Posts: 68 Joined: 8-July 04 Member No.: 1,480 ![]() |
try adding some extra stuff to see if there any warnings ur not getting. Try compiling with -ansi and -Wall. Are you using a server compiler or a local one?
|
|
|
|
Oct 21 2004, 01:49 AM
Post
#5
|
|
|
Elite IV Member Group: ++Member Posts: 647 Joined: 13-February 04 From: Ontario, Canada Member No.: 787 ![]() |
also, theres no point in putting in sstream, but i dont think it could hurt
-------------------- ![]() |
|
|
|
Oct 25 2004, 02:12 PM
Post
#6
|
|
![]() Head Of UAC Security Group: Moderators Posts: 473 Joined: 11-November 03 Member No.: 676 ![]() |
Thanks, but I don't think anymore help with this issue is necessary. I got rid of slackware and installed Fedore Core 2 and everything runs nicely. But thanks for the help. If this topic could become locked that would be great.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 01:43 PM |