Jump to content

ASCII vs ISO


Stremik

Recommended Posts

Hey Mark,

Thanks for the info (and thanks Jeff Lait).

So this confirms that the "official" compiler for windows is the 2003 .NET suite, but doesn't categorically state that the GNU tools will not work... again; has anybody tested them?

I was aware of all the template/stream related problems with MSVC 6.0 from stuff I read in the various c++ newsgroups, though I've never used it, so I'm not surprised that SESI dropped it.

Cheers!

Link to comment
Share on other sites

Hi Mario!

There is no chance, that C++ libraries build for MSVC can be used with the gnu compiler, because they both use different ABIs (Application Binary Interface). Part of this is the name-mangling scheme. It determines how the compiler is generating "C"-function-names for overloaded functions. Suppose you have functions like

void foo(int a);
void foo(float a);
void foo(int a, float b);

The name-mangling will create something like this (extremely simplified!):

void foo_int(int a);
void foo_float(float a);
void foo_int_float(int a, float b);

Now internally, you don't have any overloaded functions anymore. Every procedure is uniquely named. Unfortunately every compiler has its own variant of this method and the ANSI-consortium didn't standardize it :-( So the only way to make an API (library used to develop plug-ins. Don't confuse with the ABI) cross compiler compatible is to use plain "C". Since the HDK is a "C++"-framework, it will only work with the compiler it was "compiled" with.

A possible solution would be that gcc could be able to switch to the MSVC ABI. But this will probably never happen, because Microsoft has some patents on their vtable-layout, which is also part of the ABI (I read this somewhere, so it's not confirmed).

Frank

Link to comment
Share on other sites

There is no chance, that C++ libraries build for MSVC can be used with the gnu compiler, because they both use different ABIs (Application Binary Interface).

13421[/snapback]

Hey Frank,

That makes sense, thanks. :)

So.... would this still hold true if you linked against the Linux flavour of the houdini libs (as opposed to the MS dll's) inside an Cygwin-type environment?

From what you say, I'm guessing the answer is "no, it still wouldn't work", but then I was under the impression (from their respective websites) that things compiled in Cygwin/MinGW using their gcc distro would produce loadable object code (dll) for windows; which would mean that the output can play nice with the windows loader and libs. All of this *seems* to imply that the ports of gcc for the Cywin/MinGW environments somehow take care of the mangling, vtables, support for rtti, etc. otherwise the stuff just wouldn't work, correct?

Thanks for the insights!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...