Using IMSL C Libraries

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • amitsoni.1984@gmail.com

    Using IMSL C Libraries

    Hi,

    I wanted to solve some linear programming problems and I was trying to
    use IMSL C libraries. But I couldn't get how to use it. I don't know
    where to write the codes and how to execute them.

    Do I need to install some other softwares for using it?

    Thank you,
    Amit

  • CBFalconer

    #2
    Re: Using IMSL C Libraries

    "amitsoni.1984@ gmail.com" wrote:
    >
    I wanted to solve some linear programming problems and I was
    trying to use IMSL C libraries. But I couldn't get how to use it.
    I downloaded and installed it but I couldn't figure out where to
    write the codes and how to execute them.
    >
    Do I need to install some other softwares for using it.
    Off topic on c.l.c. Follow-ups set.

    --
    <http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
    <http://www.securityfoc us.com/columnists/423>

    "A man who is right every time is not likely to do very much."
    -- Francis Crick, co-discover of DNA
    "There is nothing more amazing than stupidity in action."
    -- Thomas Matthews

    --
    <http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
    <http://www.securityfoc us.com/columnists/423>

    "A man who is right every time is not likely to do very much."
    -- Francis Crick, co-discover of DNA
    "There is nothing more amazing than stupidity in action."
    -- Thomas Matthews


    Comment

    • Malcolm McLean

      #3
      Re: Using IMSL C Libraries


      <amitsoni.1984@ gmail.comwrote in message
      >
      I wanted to solve some linear programming problems and I was trying to
      use IMSL C libraries. But I couldn't get how to use it. I don't know
      where to write the codes and how to execute them.
      >
      Do I need to install some other softwares for using it?
      >
      To use a third-party library you need a C compiler and either a version of
      that library compatible with your cvompiler you are using, or source code to
      the librasry written in portable ANSI C.
      Though there is nothing difficult conceptually, in practise it is quite
      difficult to set up a compiler to link, and you might want to ask for
      technical support.

      Basically the compiler has paths it searches for headers (.h files) and
      these need to be set so that the headers that come with your library are on
      the path. Then it has paths it searches for links. Most compilers do not,
      however, link everything on their path by default. Usually you need to
      invoke the compiler explicitly with a link flag to link your library.

      Once you have done that, it is simply

      #include <mylibrary.h>

      int main(void)
      {
      library_functio n();
      return 0;
      }

      If the library comes in source code, you have to compile it to a library
      file. This only needs doing once and again uses special compiler switches.

      Then you have to use the functions correctly, of course. They should be
      documented.


      Comment

      • mecej4

        #4
        Re: Using IMSL C Libraries

        amitsoni.1984@g mail.com wrote:
        Hi,
        >
        I wanted to solve some linear programming problems and I was trying to
        use IMSL C libraries. But I couldn't get how to use it. I don't know
        where to write the codes and how to execute them.
        >
        Do I need to install some other softwares for using it?
        >
        Thank you,
        Amit
        >
        A prerequisite to using the IMSL libraries is an understanding of what
        object code libraries are and how to use them on the computer/OS that
        you are on.

        For example, if you have MS-C (any version will do), and IMSL CNL-5.5,
        open a command window, set the environmental variables for the C
        compiler (by running VCVARS.BAT), set the environmental variables for
        CNL (by running CNLENV.BAT), and check that LM_LICENSE_FILE points to a
        valid license file.

        To compile the quadrature example on p.259 of the IMSL manual
        Cmath_V1.pdf, put the code into a file, say qua.c, and:

        s:\cimslcl qua.c %LINK_CNL%
        Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762
        for 80x86
        Copyright (C) Microsoft Corporation. All rights reserved.

        qua.c
        Microsoft (R) Incremental Linker Version 8.00.50727.762
        Copyright (C) Microsoft Corporation. All rights reserved.

        /out:qua.exe
        qua.obj
        cmath.lib
        cstat.lib
        kernel32.lib
        user32.lib
        netapi32.lib
        advapi32.lib
        gdi32.lib
        comdlg32.lib
        comctl32.lib

        S:\cimsl>qua
        integral = -0.128
        exact = -0.128

        S:\cimsl>

        -- mecej4

        Comment

        Working...