-
September 3rd, 2024, 12:44 AM
#1
Osx and Gnu C++ compiler
The same program .cpp has been compiled into OSX without errors, It run but in assignment among variables got segmentation fault 11 while behaviour is different in Linux environment (It has been compiled in the same way) that It works fine.
Can you give me suggestions please ?
-
September 3rd, 2024, 01:31 PM
#2
Re: Osx and Gnu C++ compiler
Success on one platform doesn't mean your code is good.
It just means you stopped debugging it when it stopped crashing (and gave you plausible answers), not when it was bug-free.
Running on another platform just flushed out a few more bugs.
Try compiling it with flags g++ -Wall -Wextra -g -fsanitize=address
If you've never done any of this, expect a lot of messages.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|