mingw / undefined references

This is a discussion on mingw / undefined references within the C++ Programming forums, part of the General Programming Boards category; Hi, in my c++ project I'm using a c-library. That worked fine. Now I changed the build of that c-library ...

  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 05:48 PM.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,702
    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, 12:45 PM
  2. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 05: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, 12:02 PM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 10:51 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21