Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 36373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:22:58+00:00 2026-05-10T14:22:58+00:00

We are producing a portable code (win+macOs) and we are looking at how to

  • 0

We are producing a portable code (win+macOs) and we are looking at how to make the code more rubust as it crashes every so often… (overflows or bad initializations usually) 🙁

I was reading that Google Chrome uses a process for every tab so if something goes wrong then the program does not crash compleatelly, only that tab. I think that is quite neat, so i might give it a go!

So i was wondering if someone has some tips, help, reading list, comment, or something that can help me build more rubust c++ code (portable is always better).

In the same topic i was also wondering if there is a portable library for processes (like boost)?

Well many Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:22:59+00:00Added an answer on May 10, 2026 at 2:22 pm

    I’ve developed on numerous multi-platform C++ apps (the largest being 1.5M lines of code and running on 7 platforms — AIX, HP-UX PA-RISC, HP-UX Itanium, Solaris, Linux, Windows, OS X). You actually have two entirely different issues in your post.

    1. Instability. Your code is not stable. Fix it.

      • Use unit tests to find logic problems before they kill you.
      • Use debuggers to find out what’s causing the crashes if it’s not obvious.
      • Use boost and similar libraries. In particular, the pointer types will help you avoid memory leaks.
    2. Cross-platform coding.

      • Again, use libraries that are designed for this when possible. Particularly for any GUI bits.
      • Use standards (e.g. ANSI vs gcc/MSVC, POSIX threads vs Unix-specific thread models, etc) as much as possible, even if it requires a bit more work. Minimizing your platform specific code means less overall work, and fewer APIs to learn.
      • Isolate, isolate, isolate. Avoid in-line #ifdefs for different platforms as much as possible. Instead, stick platform specific code into its own header/source/class and use your build system and #includes to get the right code. This helps keep the code clean and readable.
      • Use the C99 integer types if at all possible instead of ‘long’, ‘int’, ‘short’, etc — otherwise it will bite you when you move from a 32-bit platform to a 64-bit one and longs suddenly change from 4 bytes to 8 bytes. And if that’s ever written to the network/disk/etc then you’ll run into incompatibility between platforms.

    Personally, I’d stabilize the code first (without adding any more features) and then deal with the cross-platform issues, but that’s up to you. Note that Visual Studio has an excellent debugger (the code base mentioned above was ported to Windows just for that reason).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This simple code is not producing any sound on a couple of machines that
When it comes to web-design, I am horrible at producing anything remotely good looking.
I am producing some XML in a java application. I am looking at the
I'm producing a hex file to run on an ARM processor which I want
How would you go about producing reports by user selected date ranges in a
I'm having some issues with producing an int matrix without creating memory leaks. I
I want to ask how other programmers are producing Dynamic SQL strings for execution
I'm exploring the XML -> XSLT -> HTML meme for producing web content. I
We have a large management software that is producing big reports of all kinds,
In my current project, I'm producing weekly releases. I've been using the technique described

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.