January 17th, 2003, 06:36 AM
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,
January 17th, 2003, 10:11 AM
Please do not crosspost the same thing in two different forums.
January 17th, 2003, 12:19 PM
January 31st, 2003, 03:27 PM
Re: c++ devel in linux
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
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
Re: c++ devel in linux
Did you try putting this line somewhere on top under the #includes
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.
using namespace std;
January 31st, 2003, 04:18 PM
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
The nameīs Hirsch, sch, not ch. thank you.
(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
Soz about that, I'm not much of a speller, M.Hirsch.
February 1st, 2003, 02:42 AM
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...)