Re: Connecting GPC to IDL [message #76525 is a reply to message #76494] |
Fri, 17 June 2011 05:46   |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Were you able to successfully compile any of the small example
programs in the IDL external directory?
On Jun 16, 5:21 pm, kBob <krd...@gmail.com> wrote:
> On Jun 14, 3:44 pm, kBob <krd...@gmail.com> wrote:
>
>
>
>> On Jun 11, 10:07 am, Michael Galloy <mgal...@gmail.com> wrote:
>
>>> kBob <krd...@gmail.com> wrote:
>>>> On Jun 10, 7:52 am, Haje Korth <hajeko...@gmail.com> wrote:
>>>> > Kelly: I have always found using gcc with IDL on Windows to be a
>>>> > difficult endeavor. Also, the use of make_dll is optional and in the
>>>> > past has made life more difficult rather than easier. I suggest
>>>> > grabbing the free edition of Visual Studio Express and creating the
>>>> > dll this way. Just remember to export the functions you will be
>>>> > accessing from IDL. This is definitely an advanced topic, so start
>>>> > with the simple examples in the external directory of the IDL distro.
>>>> > Haje
>
>>>> > On Jun 9, 10:35 am, kBob <krd...@gmail.com> wrote:
>
>>>> >> On Jun 6, 2:11 pm, kBob <krd...@gmail.com> wrote:
>
>>>> >>> I would like to use the General Polygon Clipper (GPC) thur IDL.
>
>>>> >>> This is a software package written in C that is available from
>>>> >>> Manchester that clips polygons.
>
>>>> >>> Has anyone implement this in IDL, already?
>
>>>> >>> I assume MAKE_DLL is the way to go.
>
>>>> >>> Kelly Dean
>>>> >>> Milliken, CO
>
>>>> >> I am still looking into this, as time allows.
>
>>>> >> I ahve reviewed some different ways to implement this, I have
>>>> >> determine that the following routines can be used :
>
>>>> >> LINKIMAGE
>>>> >> SPAWN
>>>> >> MAKE_DLL
>>>> >> CALL_EXTERNAL
>>>> >> CALL_EXTERNAL/MAKE_DLL
>
>>>> >> There is a nice example to use CALL_EXTERNAL/MAKE_DLL, but MAKE_DLL is
>>>> >> giving me problems as I am trying to use the gcc compiler. There is a
>>>> >> ITTVIS Tech Tip that helps, but another problem appears while dealing
>>>> >> with the IDL example.
>
>>>> >> There is a GCP DLL provided thru the MatLab Contrib site. I am playing
>>>> >> around with this in CALL_EXTERNAL, bypassing the MAKE_DLL.
>
>>>> >> Sorry, that this is turning into a blog, but I find it helps to scatch
>>>> >> some notes down once in awhile for future reference.
>
>>>> >> Kelly Dean
>>>> >> Milliken, CO- Hide quoted text -
>
>>>> > - Show quoted text -
>
>>>> Yes, apparently the ITTVIS example assumes you have Microsoft Visual
>>>> installed.
>
>>>> Well, I spent most of the day installing Microsoft Visual C++ 10.0 and
>>>> regist for the free version.
>
>>>> So far, here are the problems I am having :
>
>>>> cl.exe : Solution ?
>>>> mspdb100.dll pop-up : Solution ?
>>>> stdio.h 'no such file' : Solution ?
>
>>>> I am sure the problems are related to path, as all these file are
>>>> within the new install of MS Visual Studio 10.0.
>
>>>> Kelly
>
>>> Make sure to launch IDL from the special command line provided by VS (or
>>> set your path and possibly other environment variables accordingly).
>
>>> Mike
>>> --www.michaelgalloy.com
>>> Research Mathematician
>>> Tech-X Corporation- Hide quoted text -
>
>>> - Show quoted text -
>
>> Becoming a little wiser.
>
>> Visual Studio Command Prompt is looking for "vcvarsall.bat"
>
>> I did install MinGW. From the MinGW shell prompt I was able to make a
>> DLL -
>
>> gcc -Wall -shared gpc.c -o gpc.dll
>
>> However, this is a 32-bit DLL. The IDL 64-bit version using
>> CALL_EXTERNAL doesn't like the DLL.
>
>> Although, the IDL 32-bit version does like the DLL, but IDL promptly
>> crashes.
>
>> Progress!
>
>> Kelly- Hide quoted text -
>
>> - Show quoted text -
>
> Still working on it, but starting to lose steam.
>
> Tried to use gcc from CYGWIN to compile C source code. Failed. Reports
> from
> from tech support and other IDL users, avoid doing this.
>
> Installed Visual C++ (express) as recommended by tech support and
> other IDL
> users. Used the Visual Command Prompt, but still unable to make a 32-
> bit
> DLL without getting some kind of warning or error.
>
> Installed MinGW as suggested by tech support and other IDL users. From
> their
> experience, they have more success with compiling 3rd party packages
> with this
> package. I was able to creating a 32-bit DLL with ggc in the MinGW
> shell. Used
> -shared option to gcc to create a DLL. For example :
>
> gcc -Wall -shared gpc.c -o gpc.dll
>
> Despite the success of creating a DLL, the 32-bit IDL 6.4 crashes when
> CALL_EXTERNAL
> is used to access this sharable library. For sure, I didn't use the
> compiler properly
> to create a sharable DLL.
>
> Found a sharable DLL for the General Polygon Clipper at Mathworks
> (circa 2005). Needs
> a MatLab library to work. I didn't purse this much further, as I no
> long have MatLab
> on my desktop.
>
> New Life! Michael Galloy announced his book is available - Modern IDL.
> There is a whole
> chapter about this External Development. So, there is lots of new
> ideas to try. Even
> a Python example. GPC has a Python wrapper.
>
> Kelly
|
|
|