so I spent the last 4 days writing this program on ubuntu, everything runs nice.
but on kubuntu it craps out with a segmentation fault....wtf?
the program is being marked on kubuntu, so am I screwed?
how do I know where it seg faults?
so I spent the last 4 days writing this program on ubuntu, everything runs nice.
but on kubuntu it craps out with a segmentation fault....wtf?
the program is being marked on kubuntu, so am I screwed?
how do I know where it seg faults?
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
Erm... what program?
Learn how to use a debugger and find the problem.
googling right now...brb
Ubuntu has a very active and helpful forum - I'd ask there also, if it's Ubuntu/Kubuntu specific.
I don't have the URL because I'm on a windows box here, but I've used it several times, and it's great - just google Ubuntu forum, it'll be top of the list.
I'd be willing to bet 2 pence that you are doing something that is undefined, and the difference in the two systems makes it "work" and "fault" respectively.
Maybe using memory you don't own?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Getting anything substantial to work on one system is half skill and half luck.
It's only when you start porting the code to different systems and different compilers that you really begin to understand what all those "undefined" and "implementation-specific" statements mean.
Have you used valgrind on Ubuntu yet?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I would imagine that he means that he will submit the source code (or possibly the executable) to his instructor who then compile/execute the program on a kubuntu machine.
His segfault issue could be something simple like having a larger user stack size on his ubuntu machine. At this point it is all guesswork though; until the OP posts some code, it is hard to help.