need linux tips

FishBoy

Feeeesh
Joined
1 Aug 2004
Messages
1,685
hey i need help in a couple of things on linux, when i compile a c++ or c program i get the binary file but when i try to open it on the shell (eg: a.out) it tells me bad command name or somethng like that, and also how do i compile in debug mode i remember it was something like gbd? but i odnt know how to use it thx all
 
if a.out is in your current directory you need to execute it with:

./a.out

unless you added "." to your $PATH with is really bad. Now, for some tips:

c++ file.cpp -o file

will create the executable "file" in your current directory which can be executed like so:

./file

To create a file with debugging symbols built in, you need to add the -g flag to c++

c++ -g file.cpp -o file

Then you can use gdb:

gdb ./file

In GDB you need to type "run" and the program will run, google for tutorials on how to use gdb, as it is a huge program with so many different abilities, that i can't explain them even in 5 replies.
 
awesome thx X i executed the output file, and good thing i didn't have to use gdb it compiled :D i got the errors fixed out
 
hey how do i get my sound to work each time i load linux, coz everytime i load it ihave to go to SuSE Hardware Tool and delete and re-add the sound card and the card will work again, SuSE Linux 9.1
 
have you tried this:

YasT -> System -> SysEditor -> Hardware -> Soundcard -> LOAD_SEQUENCER = YES

if this one doesn't work. You may have to add a line to the .conf file, but being new myself, I am not for sure what it is called. But it is something along these line probably. Good luck!
 
no i had a check box called "start sequncer" which is alwasy checked
 
how do i examine an error in depth using gdb
it's telling this:

Code:
Program received signal SIGSEGV, Segmentation fault.
0x40184705 in strncpy () from /lib/tls/libc.so.6
that strncpy() worked in another place in my code but i wanna know why it's failling this specific time

EDIT:
well i got it i replace the strncpy() with a for loop to copy the string and i still go the error but this time it told me that i was going out of bound so i was able to fix it :D
 
how come ntfs writting on linux is dangerous, how could i make it so i could write to it.
 
fishboy, for linux help you're in the wrong forum, you should go to:
http://www.linuxquestions.org/ < Here I have found a post (a very often solutions) about my linux problems
or if you're using a fedora distro check out:
www.fedoraforum.org < Even more useful for me than linuxquestions

(No offense to osnn or it's members, for windows and mac togther we're pretty great, but in linux matters we're sub par.)
 
no i think X-Istence is pretty good in linux and programming i always count on him when i need help/tips in these 2 things
but yea i know about linuxquestions.org but im more used to this forum i think i did register on that site long time ago

edit:
i'll give it a go though :D
 
oh
The possibility of destroying your filesystem is very high.
...
Make a mistake and the filesystem will be damaged, make too many mistakes and the filesystem will be destroyed.
see how encouraging that is... im getting 2nd thoughs, coz all of my media files are in there lol

cool but there are drivers for ext2 and ext3 for windows
 
NetRyder said:
Yeah, I wouldn't do it if I were you. ;)
yea im just gonna try and make a small fat32 partition for like "transfers" between the 2 OS and that should be great

i also posted question on linuxquestions.org if you guys wanna see
Link
 
does the disk affect the OS performance and 'stubborness' in anyway? coz my linux seems to not be acting as it used to long time ago and on my friend's computer
 
hey i didn't wanna make a new thread about this i thought just squeeze it in this thread i just wanted to know how do i restore GRUB coz i dont exactly know what happened but i know that it's not working anymore (SuSE 9.1) i think i cna access the command line thingy when i inster cd1 so any way i could restore GRUB from there? thx all
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,623
Latest member
AndersonLo
Back