[Gdal-dev] Trouble linking GDAL library and Matlab
guillaume huby
guillaume.huby.lists at gmail.com
Mon May 7 11:54:31 EDT 2007
On 5/5/07, Gennady Khokhorin <gok at aerometric-ak.com> wrote:
Thanks for your reply.
I did switch to cpp and was able to create .mexs32 file as well as .dll
> dynamically linked to gdal.
>
Steps you could try:
> 1. rename file to test.cpp;
> 2. load libs in the header:
> #include "mex.h"
> #include "C:\my_Projects\packages\gdal-1.4.0\distrib\include\gdal_priv.h"
> #pragma comment (lib,"gdal_i-vc8.lib") // dynamic link
> #pragma comment (lib,"libmex.lib") // static link (for mexErrMsgTxt)
> 3. copy both libs to test.cpp folder;
> 4. matlab: "mex test.cpp" or "mcc -v -B cpplib:testlib test.cpp"
>
> My environment: msvc8.0+gdal1.4.0
I did it using gdal_i.lib from FWTools1.2.1. But no more success, Matlab
(btw I use 7.4) is still saying:
??? Invalid MEX-file '<path>\test.mexw32' The specified procedure could not
be found.
But I downloaded GDAL sources and built with msvc8.0. and with add of
gdal14.dll in directory it seems to work.
I hope that programming will follow more easily now :p
Thanks for your help.
Guillaume.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070507/2513de70/attachment.html
More information about the Gdal-dev
mailing list