CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: M_APM Linker error

  1. #1
    Join Date
    Jul 2007

    M_APM Linker error

    I have a program in which I am using MAPM functions to deal with large numbers. I've written the program and have included m_apm.h but I still get an error, upon compiling, that says [linker error]...m_apm_function(M_APM...). I don't know how to solve this problem. I'm using Dev-C++ to compile, and I've gone to tools->options->directories->include (is that right?) and have added the folder with all of the MAPM files, including m_apm.h. I don't quite understand why there is a problem, since m_apm.h contains all of the functions that I am using. Since I don't understand how this Linker thing works, maybe it would be best if I just put the contents of m_apm.h into my program. What should I do?

  2. #2
    Join Date
    Apr 2009

    Re: M_APM Linker error

    MAPM has two components, and it seems you forgot the second one:

    1. A header file containing the prototypes of external functions

    2. A library containing the functions themselves.

    This library has several versions. At , I read there is a version for Unix, named libmapm.a, and a version for Dos named libmapm.lib.

    A. Place the library in the directory of libraries, ......./Dev-Cpp/lib

    B. In the menu bar, click on "Project/Project Options". Then click on the tab for "Parameters".

    C. In the "Linker" area, type -lmapm
    (it is l like library, then mapm, and ib is omitted for historical reasons when the command line had to be short.)

    I have used that method successfully for another library, libjpeg. In my case, although, it was for Windows, I needed libjpeg.a instead of libjpeg.lib.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)