X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



3369 Rate this article:
No rating

Using CALL_EXTERNAL with the Cygwin environment

Some Windows developers choose to use the Cygwin GCC port as their compiler. This TechTip describes how to set up IDL so that CALL_EXTERNAL works with GCC.

Several customers have reported success using CALL_EXTERNAL with Cygwin's GCC Windows port instead of Microsoft Visual Studio.

  • Create a new user environment variable (Control Panel -> System -> Advanced -> Environment Variables) called IDL_DLM_PATH.

    Set this to: C:\RSI\IDL61\bin\bin.x86;c:\cygwin\bin

  • Set the following parameters on !MAKE_DLL:
    1. !make_dll.LD = 'c:\cygwin\bin\ld.exe -shared -o %L %O %X'
    2. !make_dll.CC = 'c:\cygwin\bin\gcc.exe %X -fPIC -I"/cygdrive/c/RSI/IDL61/external/include" -c -D_REENTRANT %C -o %O'
    3. !make_dll.COMPILER_NAME='GCC'
  • To test, load and compile the STRING_ARRAY.PRO example in the IDL61\external\call_external\C subdirectory.

    IDL> string_array, 'Hello, Cygwin!', /VERBOSE

    Calling string_array with:

    STRARR_L STRING = 'Hello, Cygwin!'

    Hello, Cygwin!

    Result from string_array is:

    RESULT STRING = 'Hello, Cygwin!'

If the PATH environment does not also include c:\cygwin\bin, users may receive an error message that cygwin1.dll could not be found.

Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »