comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Connecting GPC to IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Connecting GPC to IDL [message #76632 is a reply to message #76494] Mon, 20 June 2011 14:19 Go to previous messageGo to previous message
KRDean is currently offline  KRDean
Messages: 69
Registered: July 2006
Member
On Jun 20, 10:00 am, kBob <krd...@gmail.com> wrote:
> On Jun 17, 1:00 pm, Haje Korth <hajeko...@gmail.com> wrote:
>
>
>
>
>
>> Ok, typically when using visual studio from the command line you need
>> to execute a batch file so set the paths correctly. On my machine this
>> is vsvars32.bat. It it siemwhere in the visual studio tree. I copied
>> it to c:\windows so that it is always found. Then try the examples
>> again, and do not attempt to compile gpc until the examples work. The
>> next question I have is whether you wrote the proper wrapper routines
>> to interface from IDL to gpc?
>
>> On Jun 17, 10:15 am, kBob <krd...@gmail.com> wrote:
>
>>> On Jun 17, 6:46 am, Haje Korth <hajeko...@gmail.com> wrote:
>
>>>> 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- Hide quoted text -
>
>>>> - Show quoted text -
>
>>> Nope!
>
>>> I have been working with the ITTVIS example routine SIMPLE_VARS.pro
>
>>> Common errors are undefine reference, unrecoginize commands (CL),
>>> missing libraries (mspdb100.dll), and cannot find <stdio.h>.
>
>>> Kelly- Hide quoted text -
>
>> - Show quoted text -
>
> Will the vsvarall.bat file work? It is in the Visual C++ 10.0
> directory.
> The vsvar32.bat is in the VC /bin directory.
>
> I moved the vsvarall.bat (as well as the vsvar32.bat) to the C:
> \windows
> directory and the same problems persit. You move it there to be found
> by what app? I assume MAKE_DLL is starting a adminstrator command
> prompt.
>
> I have yet to work on the IDL wrapper for GPC. I am still working to
> get
> the ITTVIS examples to work.
>
> Kelly- Hide quoted text -
>
> - Show quoted text -

Well this works (ITTVIS example) ...

Start up a Command Prompt ...

Drag-n-drop the vsvarall.bat from the Visual Studio C++ 10.0 VC
directory into the command prompt ...

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
\vcvarsall.bat"

Drag-n-Drop the (IDL 6.4) idlde.exe into the same Command Prompt ...

"C:\Program Files\ITT\IDL64\bin\bin.x86\idlde.exe"

Hit return in the active command prompt and the IDL DE starts up.

Now you can running the ITTVIS CALL_EXTERNAL examples work just fine.

However, is this a viable solution?

Maybe for a quick and dirty - get-it-done - option.

Kelly
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: cgContour Update
Next Topic: Re: Sort a HASH

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 01:31:17 PDT 2025

Total time taken to generate the page: 0.63869 seconds