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