realbasic-nug
[Top] [All Lists]

Re: Declares different on Win v Mac?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Declares different on Win v Mac?
From: Ken Mankoff <mankoff at gmail dot com>
Date: Tue, 9 Aug 2005 16:15:05 -0400
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=DcrWkBTMNobL7j8TTLzL/cmd+bhwArZZ+BacEkmAKzDFMfPDDIdlEnqiiDfl2T4BOinrqHzwWBsA7UO9x2TF3v22a4TFOvAIpzzBpqC+6FOv4ABeIpa0NHhQhM7LTn1EOQO19y3htGK3M/8t/8zRUZPmzwbwy/nMDs7h55Rw/jE=
References: <5c8121ef0508091052c482c3d at mail dot gmail dot com> <46ade30920c0f0e7aad61bab085c251c at declareSub dot com> <5c8121ef05080911236b9a2123 at mail dot gmail dot com> <EC6E389D-410E-46E6-B6CB-0830AA5F6A57 at ljug dot com> <5c8121ef05080912024361f9a5 at mail dot gmail dot com> <D1D7EB0E-0B2E-42B9-8E71-3434541FF95C at ljug dot com> <5c8121ef050809130057217c90 at mail dot gmail dot com> <46e73e096e851f1393a1dddb0a0d364b at declareSub dot com>
On 8/9/05, Charles Yeomans <charles at declaresub dot com> wrote:
> 
> 
> On Aug 9, 2005, at 4:00 PM, Ken Mankoff wrote:
> 
> > On 8/9/05, Brady Duga <duga at ljug dot com> wrote:
> >>
> >>
> >> On Aug 9, 2005, at 12:02 PM, Ken Mankoff wrote:
> >>>
> >>> If I try to compile the Windows version from the Mac I get the same
> >>> compile-time errors. ?!?!
> >>
> >> Weird. Maybe you have some platform-specific code nearby? Or maybe
> >> there is something wrong with the Windows constant - you might want
> >> to double check that. And I see from your next email that may be the
> >> case. Make sure the target is correct and that the "string" button is
> >> pushed for the constant.
> >
> >
> >
> > Yes wierd. Wierd enough I think it is a bug. So my actual declare code
> > is
> > this:
> >
> > #If DebugBuild
> > soft declare function nc_inq_dim lib library_debug ( ncid as integer,
> > dimid
> > as integer, namePtr as ptr, byref length as integer ) as integer
> > #else
> > soft declare function nc_inq_dim lib library ( ncid as integer, dimid
> > as
> > integer, namePtr as ptr, byref length as integer ) as integer
> > #endif
> 
> Here's the problem. The compiler sees both declarations and decides
> that there is a name conflict because the same function is declared
> twice. I've encountered this a lot in writing declarations for MacOS
> Classic/Carbon.



But I don't encounter this when compiling for and on a Mac. I only encounter 
this problem when compiling for windows.

Actually, I have just gotten the same problem on a Mac, but only if I add:
#If TargeWin32
' 3rd declare statement goes here
#endif

Which is really strange, because the Mac compilation should ignore that code 
segment.

So what is your work-around? Use a different name for the declared function 
on each build/platform? If that is the case, what is the point of 
conditional compiles? Have you filed a bug report on this? If so, I would 
like to sign on to it.

-k.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>