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>
|