Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Linker Problem

  1. Jun 16, 2010 #1
    Hi,

    I use Eclipse, MinGW++ and the library Halcon and can't get it right. There must be something wrong with the linker options as I get the error message: "undefined reference to ... ".

    My settings under -> Properites -> C/C++ Build -> Settings-> MinGw++ Linker -> Libraries
    are:

    Libraries (-l):
    halcon
    halconcpp

    Library search path (-L):
    ..\..\lib\x86sse2-win32
    ..\..\bin\x86sse2-win32

    Is there something else I have to consider? Or something wrong with my settings?

    Would be great if someone knows a solution. Thanks!
    Tanja
     
  2. jcsd
  3. Jun 16, 2010 #2

    Mark44

    Staff: Mentor

    What is the rest of the linker error message? Is it to a function in your code or to a library function that your code is using?
     
  4. Jun 16, 2010 #3
    The entire message:


    **** Build of configuration Debug for project HalconTest ****

    **** Internal Builder is used for build ****
    g++ -IC:\Program Files\MVTec\HALCON-9.0\include -O0 -g3 -Wall -c -fmessage-length=0 -oRectangleIntoArray.o ..\RectangleIntoArray.cpp
    g++ -s -LC:\Program Files\MVTec\HALCON-9.0\lib\x86sse2-win32 -oHalconTest.exe RectangleIntoArray.o -lhalcon -lhalconcpp
    RectangleIntoArray.o: In function `main':
    C:/Program Files/Eclipse/HalconTest/Debug/../RectangleIntoArray.cpp:25: undefined reference to `_imp___ZN6Halcon6HImageC1EPKc'
    RectangleIntoArray.o: In function `ZSt17__verify_groupingPKcjRKSs':
    C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/locale_facets.tcc:2498: undefined reference to `_imp___ZTVN6Halcon6HImageE'
    C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/locale_facets.tcc:2499: undefined reference to `_imp___ZN6Halcon7HObjectD2Ev'
    collect2: ld returned 1 exit status
    Build error occurred, build is stopped
    Time consumed: 1171 ms.
     
  5. Jun 16, 2010 #4

    Mark44

    Staff: Mentor

    Those seem to be functions in some Halcon lib, and not to a function that you wrote. The only thing I can think of to check is that the names you are using are exactly correct; e.g., that they don't being with two underscores instead of the single underscore you are using. If that's not the problem, then for some reason the correct lib isn't being found.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Linker Problem
  1. Perl problems (Replies: 4)

  2. Fortran problem (Replies: 1)

  3. Problems with zheev (Replies: 4)

  4. Javascript problem (Replies: 6)

  5. Problem with dgesv (Replies: 5)

Loading...