From: "bubble" <kuan_long@hotmail.com>
Subject: Re: pragma import ambiguity
Date: 6 Sep 2006 09:42:11 -0700
Date: 2006-09-06T09:42:11-07:00 [thread overview]
Message-ID: <1157560931.565325.219600@p79g2000cwp.googlegroups.com> (raw)
In-Reply-To: <1157560770.358187.249610@i3g2000cwc.googlegroups.com>
I think your C/C++ compiler should "NOT" allow to compiler it because
C does
not allow the same name in code.
sorry missing "NOT".
bubble 寫道:
> are you mean there are the same name symbols in a library?
>
> I assume your library is standard winapi and writing in C not C++.
> the C++ have name decoration problem
> to avoid the name decoration problem
>
> you "may" use external "C" to solve it.
>
> like
>
> #ifdef __cplusplus
> external "{"
> #end if
> __declspec(dllexport) int clear;
> int __declspec(dllexport) __stdcall clear();
>
>
> #ifdef __cplusplus
> }
> end if
>
> I think your C/C++ compiler should allow to compiler it because C does
> not allow the same name in code.
>
>
>
> another way.
> you should create a def file and there are alias names in it.
>
>
>
>
>
> tmoran@acm.org 寫道:
>
> > One Ada compiler accepts this, another doesn't. I agree with the one that
> > objects. Are we wrong?
> > procedure testimp is
> > type logicopenm is ( clear, gl_and);
> > procedure clear(mask:integer);
> > pragma import(stdcall,clear,"glclear");
> > begin
> > null;
> > end testimp;
next prev parent reply other threads:[~2006-09-06 16:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-06 16:05 pragma import ambiguity tmoran
2006-09-06 16:39 ` bubble
2006-09-06 16:42 ` bubble [this message]
2006-09-06 17:47 ` Pascal Obry
2006-09-21 1:26 ` Dave Thompson
2006-09-06 17:34 ` Frank J. Lhota
2006-09-06 18:06 ` Gautier
2006-09-07 7:53 ` Dmitry A. Kazakov
2006-09-07 19:35 ` Adam Beneschan
2006-09-08 3:48 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox