Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2006

Tip: Looking for answers? Try searching our database.

Portable C++

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Roberts - 30 Jul 2006 16:13 GMT
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?
Bruno van Dooren [MVP VC++] - 30 Jul 2006 17:30 GMT
> 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.

Signature

Kind regards,
   Bruno van Dooren
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.