The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> C Programming
|
c++ devel in linux
Discuss c++ devel in linux in the C Programming forum on Dev Shed. c++ devel in linux C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 17th, 2003, 06:36 AM
|
|
Junior Member
|
|
Join Date: Oct 2002
Location: Ireland
Posts: 26
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
c++ devel in linux
Im using suse 8.1, but having always used windows, I am finding linux quite frustrating.
First of all, I cannot seem to compile almost anything, with g++. It does not seem to recognise iostream commands like cout and cin, though it does not throw an error for including <iostream>. Are there librarys I must include when compiling with g++?
It does compile a simple main fuction that only calls a printf statement. I try to run the compilation with the ./ command but it comes up permission denied. The ./ command seemed to work for me when I was using RedHat 7.1. Is there another command? Or have I some setting that does not let me run files through the console?
I hope the above has made some sense.
I look forward to any advise.
Thanking you in advance,
Samwise Gamgee
|

January 17th, 2003, 10:11 AM
|
 |
/(bb|[^b]{2})/
|
|
Join Date: Nov 2001
Location: Somewhere in the great unknown
|
|
|
Please do not crosspost the same thing in two different forums.
|

January 17th, 2003, 12:19 PM
|
|
Junior Member
|
|
Join Date: Oct 2002
Location: Ireland
Posts: 26
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
cool. np.
|

January 31st, 2003, 03:27 PM
|
 |
Contributing User
|
|
Join Date: Jan 2003
Location: USA
|
|
|
Re: c++ devel in linux
Quote: Originally posted by gamgee
It does compile a simple main fuction that only calls a printf statement. I try to run the compilation with the ./ command but it comes up permission denied. The ./ command seemed to work for me when I was using RedHat 7.1. Is there another command? Or have I some setting that does not let me run files through the console? |
A quick, stupid question on that. What are the permissions set to? I'm not sure what the error message would be if the executable permission is not set, but that seems like a first thing to check.
BTW, I've not yet tried to compile a C++ program under Linux, so I'm not sure what could be wrong with your I/O streams.
|

January 31st, 2003, 03:39 PM
|
|
Contributing User
|
|
Join Date: Oct 2000
Location: Back in the real world.
|
|
|
gcc would set the right permissions for the output file. the problem is somewhere else.
are you on a different filesystem than your /bin (/usr/bin)?
maybe someone thought it would be a good idea to not allow users to execute any programs that donīt belong to the basis system? - just a guess... or are you running a FAT filesystem for your home directories so you can access it from windows too...
1000 possible problems...
|

January 31st, 2003, 04:06 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
|
Re: c++ devel in linux
Quote: Originally posted by gamgee
First of all, I cannot seem to compile almost anything, with g++. It does not seem to recognise iostream commands like cout and cin, though it does not throw an error for including <iostream>. Are there librarys I must include when compiling with g++?
|
Did you try putting this line somewhere on top under the #includes
Code:
using namespace std;
IIRC, the old g++ (2.95 or so) would compile certain code with or without this line, but a later version (3.xx) would barf, if it wasn't there.
|

January 31st, 2003, 04:18 PM
|
|
Junior Member
|
|
Join Date: Oct 2002
Location: Ireland
Posts: 26
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I think you could be on something there Mr. Hirsh. It was on a partition of the fat file system, that was also accessible by windows. I worked around (cheated) what ever the problem was by coping the necessary files, to my home directory, where they run fine.
Thanks for all the input guys.
|

January 31st, 2003, 04:30 PM
|
|
Contributing User
|
|
Join Date: Oct 2000
Location: Back in the real world.
|
|
The nameīs Hirsch, sch, not ch. thank you.
good nite.
(if you wanna know why i am that bad-mooded, read this: )
usenet is here
not related to your post at all! just a general issue here since a few days... please donīt take it as an personal issue
again, no relation to your thread here. please donīt misunderstand...
|

January 31st, 2003, 04:53 PM
|
|
Junior Member
|
|
Join Date: Oct 2002
Location: Ireland
Posts: 26
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Soz about that, I'm not much of a speller, M.Hirsch.
nn.
|

February 1st, 2003, 02:42 AM
|
|
Contributing User
|
|
Join Date: Oct 2000
Location: Back in the real world.
|
|
donīt worry, no problem 
(as you can tell, i am in much better shape now after getting the sleep i was missing this week...)
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|