Thread: mingw / undefined references

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    519

    mingw / undefined references

    Hi,

    in my c++ project I'm using a c-library. That worked fine.
    Now I changed the build of that c-library from a dynamic to a static one. If I want to link to get my executable, Mingw emits such a message for every function I'm using:

    Code:
    ../../src/entity/EntityManager.cpp:453: undefined reference to `_imp__RM_init'
    Under linux/gcc it works. And the static library is mentioned on the linker command line. Maybe it's some name-mangeling problem? What could I try to get over it?

    Thank you in advance!


    edit: if I search the .o file I only see RM_init but not _imp__RM_init
    Last edited by pheres; 09-18-2007 at 04:48 PM.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Make sure the function decl.'s don't still have the "dllexport" attribute on them.

    gg

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    thank you, that was the problem.

    but I can't really change this, the library is not under my control. So I guess a have to stick to dynamic linking :/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  2. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 04:42 PM
  3. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  4. Problem with OpenGL tutorial
    By 2Biaz in forum Windows Programming
    Replies: 18
    Last Post: 09-16-2004, 11:02 AM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 09:51 AM