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 14:07:48 -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=P0oxwf/KWBBuGW2IbeJ9KeRxLMz4GIci0br8CF68YQBVozuvYmh2v1eZsGZ6g5oIgKYOmc13X1i8TqxCEy67sDzoMaVZbrA4A3UHD9zXH8kdULIT/+NvZVOz2uOlhxyIAkaU44LMR+7DKkfMWSX58dx50qveksy9XhY5vz+g+Mg=
References: <86df6986d25e dot 86d25e86df69 at shaw dot ca>
I agree. I left out one important point in my original email.

On Windows, the "library" string constant is: "c:\EVA\netcdf.dll"

Otherwise my code is the same.

-k.


On 8/9/05, Scott Pawluk <lists dot scott dot pawluk at shaw dot ca> wrote:
> 
> I don't believe you will ever get a Mac declare to work on Windows. Binary 
> libraries from Mac are not compatible with Windows. Nor are Linux libraries 
> compatible with Windows. Only Windows libraries (generally DLLs) are 
> compatible with Windows. The only "cross-platform" libraries I have even 
> heard of are for Java. The best you can get in REALbasic is plugins that 
> support the various platforms. This is why there is no "Windows 
> Functionality Suite" for Mac.
> 
> -----
> Scott Pawluk
> REALbasic v5.5.5, Windows XP Home SP 2
> (trying RB2005r2)
> 
> ----- Original Message -----
> From: Ken Mankoff <mankoff at gmail dot com>
> Date: Tuesday, August 9, 2005 12:52 pm
> Subject: Declares different on Win v Mac?
> 
> > Hi Group,
> >
> > I have some declares I've been using successfully on Mac. I am now
> > porting
> > my app to Windows and the declare statements are producing errors
> > so that my
> > app won't even compile. The library I am linking to is cross
> > platform and
> > has the same function prototypes on both Win and Mac.
> >
> > Here is my mac code:
> >
> >
> > ' library is a constant
> > @executable_path/../../lib/netCDF/libnetcdf.dylib' the function
> > is: int nc_inq_dim( int ncid, int dimid, char *name, size_t*
> > lengthp );
> >
> > dim ncid, dimid, length as integer
> > dim namePtr as memoryBlock = newMemoryBlock( 32 )
> >
> > soft declare function nc_inq_dim lib library( ncid as integer,
> > dimid as
> > integer, namePtr as ptr, byref length as integer ) as integer
> > dim err as integer = nc_inq_dim( ncid, dimid, namePtr, length )
> >
> > this works fine on Mac. This does not work on windows.
> >
> > The compiler complains about the use of namePtr in the 2nd line
> > (the
> > function call, not the declaration).
> >
> > Any suggestions appreciated.
> >
> > Thanks,
> >
> > -k.
> > _______________________________________________
> > Unsubscribe or switch delivery mode:
> > <" target="l">http://www.realsoftware.com/support/listmanager/>
> >
> > Search the archives of this list here:
> > <" target="l">http://support.realsoftware.com/listarchives/lists.html>
> >
> 
> _______________________________________________
> 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>
>
_______________________________________________
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>