CyberiaPC.com Community Forums Main Page
RSS Feeds: Late(st) News | Zenith Picture Gallery | Most Recent Community Topics | Tips, Tricks and Other Useful Stuff

Welcome Guest ( Log In | Register )

Closed TopicStart new topic
> AAGGHHH Cursed Linux
Iron Gland
post Sep 22 2004, 02:40 PM
Post #1


Head Of UAC Security
Group Icon

Group: Moderators
Posts: 473
Joined: 11-November 03
Member No.: 676

United States




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!!
Go to the top of the page
 
+Quote Post
usr.c
post Sep 22 2004, 06:11 PM
Post #2


Boss, my code's compiling (xkcd)
Group Icon

Group: Admins
Posts: 10,440
Joined: 19-September 01
Member No.: 1

Nothing Selected




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), Skydiving, Splitting atoms, Flying a space shuttle
"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
Go to the top of the page
 
+Quote Post
Iron Gland
post Sep 23 2004, 12:50 PM
Post #3


Head Of UAC Security
Group Icon

Group: Moderators
Posts: 473
Joined: 11-November 03
Member No.: 676

United States




I'm using Slackware Linux 10. I had it automatically install all the necessary packages in the beginning. I hate linux right now.
Go to the top of the page
 
+Quote Post
K.J.
post Oct 11 2004, 06:53 PM
Post #4


Full Member
*

Group: Members
Posts: 68
Joined: 8-July 04
Member No.: 1,480

United States




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?
Go to the top of the page
 
+Quote Post
biohazard
post Oct 21 2004, 01:49 AM
Post #5


Elite IV Member
Group Icon

Group: ++Member
Posts: 647
Joined: 13-February 04
From: Ontario, Canada
Member No.: 787

Canada




also, theres no point in putting in sstream, but i dont think it could hurt


--------------------
user posted image
Go to the top of the page
 
+Quote Post
Iron Gland
post Oct 25 2004, 02:12 PM
Post #6


Head Of UAC Security
Group Icon

Group: Moderators
Posts: 473
Joined: 11-November 03
Member No.: 676

United States




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.
Go to the top of the page
 
+Quote Post

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th May 2013 - 01:43 PM