473,378 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Portable C++

Could anyone recommend to me any good books or online articles that contain
in depth coverage of portable C++ development? Specifically writing binary
compatible C++ interfaces and code that will work and be fully compatible
where code built under multiple versions of the compiler/runtime are being
used in the same process. Exceptions are being thrown over module
boundaries.

Currently the system is deployed on Windows and components built with VC8, 7
and 6 are all used within the same process, due to efforts by Microsoft to
make their compilers/runtimes compatible this just works, will this continue
to be the case if the system is built for say Linux and several versions of
the compiler are mixed?
Jul 30 '06 #1
1 1140
Could anyone recommend to me any good books or online articles that
contain in depth coverage of portable C++ development? Specifically
writing binary compatible C++ interfaces and code that will work and be
fully compatible where code built under multiple versions of the
compiler/runtime are being used in the same process. Exceptions are being
thrown over module boundaries.
I am sorry, but what you want to do is virtually impossible.
different compilers are almost always incompatible.
Currently the system is deployed on Windows and components built with VC8,
7 and 6 are all used within the same process, due to efforts by Microsoft
to make their compilers/runtimes compatible this just works, will this
continue to be the case if the system is built for say Linux and several
versions of the compiler are mixed?
Microsoft is indeed a company that values binary compatibility.
If you would try to do this on linux, you would -in all likelihood- fail.
gcc is notorious for incompatibility across versions. In part this is
because the whole point of the open source is to advocate source
distribution.
providing binary compatibility would be like shooting yourself in the foot.
(I am all for binary standards, but that is just me.)

mixing different compilers (like gcc and msvc) for C++ is not going to work
either.

The only exception is if you create COM components. for COM to work, class
vtables have to have a specific layout.
Since every compiler supports COM, that is where your only option lies.

--

Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"
Jul 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: James Harris | last post by:
Hi, Can someone recommend a book that will teach me how to approach C programming so that code is modularised, will compile for different environments (such as variations of Unix and Windows),...
22
by: SeeBelow | last post by:
Is there any way, in C, of interacting with a running program, but still using code that is portable, at least between linux and Windows? By "interacting" it could be something as simple as...
10
by: Jason Curl | last post by:
Dear C group, I'm very interested in writing portable C, but I only have GNU, Sparc and Cygwin to compile on. What I find is the biggest problem to writing portable C is what headers to...
8
by: suresh_C# | last post by:
Dear All, What is difference between Portable Executable (PE) file and a Assembly? Thanks, Mahesh
2
by: Tull Clancey | last post by:
Hi all. I'm nearing completion of a host app that needs to send data to, and receive data back from a portable, an HP device. The application running on the portable will be a .net application....
131
by: pemo | last post by:
Is C really portable? And, apologies, but this is possibly a little OT? In c.l.c we often see 'not portable' comments, but I wonder just how portable C apps really are. I don't write...
162
by: Richard Heathfield | last post by:
I found something interesting on the Web today, purely by chance. It would be funny if it weren't so sad. Or sad if it weren't so funny. I'm not sure which. ...
409
by: jacob navia | last post by:
I am trying to compile as much code in 64 bit mode as possible to test the 64 bit version of lcc-win. The problem appears now that size_t is now 64 bits. Fine. It has to be since there are...
10
by: bramnizzle | last post by:
I don't know if this is the right thread or not, but... In my endless pursuit to hold on to my dinosaur laptop (Dell 1100 Inspiron - circa 2004)...I want to keep as much space free for my...
23
by: asit | last post by:
what is the difference between portable C, posix C and windows C ???
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.