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:00:07 -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=LfEkaqJxFOdDXpAOCNC8zX74ojKdVkpgu8ZAvzgyxN/de3/rPAlQIlR4lLvCWeE2n00Ye3cXCf8S+X5l2kb4rIQ8x1jLP0jNGhG642OroA0AQEhn+V4r2ElJC6JhAvCtyHgtIWgd65j3cl0c8MdaiJBSyqTilkPnB6haNhUriAw=
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>
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

Because RB allows constants specific to platforms, but *not* to builds, and 
the relative location for the app changes on a debug v. real build.
So "libary" on the mac distribution build is: 
@executable_path/../../lib/netCDF/libnetcdf.dylib
and "library_debug on the mac debug build is: 
@executable_path/../../../lib/netCDF/libnetcdf.dylib (note extra ../ thrown 
in there)

And if I comment out 4 of the above 5 lines (all the #'s and one of the 
declare statements) it works.

Well, for the Mac it works always no matter what. But I can't compile for 
windows if I have the #if #else #endif and the two declares. If I have only 
1 declare then it works. Strange, but true.

What do you think? Bug report?

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