Trouble Linking Eclipse, MinGW++ and Halcon: Need Help!

  • Thread starter Thread starter Tanja
  • Start date Start date
  • Tags Tags
    Eclipse
AI Thread Summary
The discussion revolves around troubleshooting linker errors encountered while using Eclipse with MinGW++ and the Halcon library. The user, Tanja, is facing an "undefined reference" error, indicating that certain functions from the Halcon library are not being linked correctly. The error messages specify missing references to Halcon functions, suggesting that the issue lies within the library linking process. Key points include the need to verify the accuracy of the library names used in the linker settings, ensuring they match exactly with the expected names in the Halcon library. Additionally, there is a suggestion to check if the correct library files are being included and whether the library paths are set correctly in the project settings. The overall focus is on ensuring proper configuration of the linker options to resolve the undefined references.
Tanja
Messages
43
Reaction score
0
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
 
Technology news on Phys.org
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?
 
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.
 
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.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.

Similar threads

Replies
3
Views
8K
Replies
12
Views
3K
Replies
5
Views
1K
Replies
2
Views
5K
Replies
11
Views
2K
Replies
3
Views
3K
Replies
2
Views
5K
Replies
6
Views
4K
Replies
2
Views
2K
Back
Top