Post by tim_cPost by Jiri MalakYour conclusions are completely wrong.
We are talking cross purposes about a problem I have never come across
before and I hazard a guess you haven't either.
Post by Jiri MalakEspecialy statement about source compatibility problem for OW compiler.
What you describe is binary compatibility problem.
No. GCC and MSC can compile the sources and are self compatible. I am
not talking intercompiler compatibility. Nothing to do with calling
conventions. It is a pure textual naming problem.
Unfortunately if you refere to unportable code (which use unportable feature
or some language extension) than it is
uncompatible, but it is nothing related to OW it is general problem with
unportable code.
You can not expect that you can cross compile this type of code.
Post by tim_cOW cannot compile the sources, it does not work because the sources make
a program which violates the naming convention used by OW.
The program can be given a third party dll compiled by someone else
(assume was compiled using OW), no def file, no header, the dll is
simply dropped into a directory. A user at runtime says use
facility "fred".
The dll is called perhaps fred.dll
The calling program tells Windows to load fred.dll, computes perhaps the
textual name initialise_lib_fred and asks Windows for the address of
initialise_lib_fred inside the dll.
You must understand calling convention ( including symbol naming rule) used
by DLL.
You incline separate symbol name rule from calling convention, this is wrong
approach.
All must be consistent to get proper result.
Post by tim_cUnfortunately OW has appended "_"
Binary compatibility is perfect, can be anything which works with a dll.
Editing any of the sources is impractical, has to be a simple solution.
If I understand you correctly then you have DLL source code.
In this case I didn't understand your problem.
If it is unportable code then you must fix it.
If you need some code override for OW compiler then you can use possibility
to include
some header file by compiler -fi command line option or by FORCE environment
variable.
Post by tim_cI found that using __syscall worked but on checking a variety of sources
it failed. A source used an indirect call to an OW lib function which
uses __watcall, not so easy to fix.
(the lib probably ought to have autoselect as I used many years ago, but
it doesn't)
It is interesting if you are talking about __syscall calling convention.and
problem with underscore,
because this calling convention doesn't use any underscore for symbol names
rules.
I don't understand why you talk about __watcall convention in relation to
your DLL if it is not compiled by OW.
If it is using some indirect call to C RTL it is calling to original
compiler CRTL DLL not to OW version.
It looks like you try to do something strange.
Post by tim_cEventually on trying again I found out how to rename. Tried it first but
failed. (the docs are very difficult for me, probably for much the same
reason that writing here leads to cross purposes, that is life)
OW compilers have very poverful auxiliary pragma "#pragma aux" which can do
regular way change in any
calling convention to reflect any special requirements as symbol naming rule
if it is necessary.
But in your case I don't expect any "exotic" compiler that existing OW
calling conventions should be anough without any change.
Jiri