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

  • Thread starter Tanja
  • Start date
  • Tags
    Eclipse
In summary: Check your paths. If you can't figure it out, you could try asking on the Halcon forum.In summary, the conversation is about a person experiencing an undefined reference error in their code while using Eclipse, MinGW++, and the library Halcon. They have checked their linker options and are unsure if there is something else they need to consider or if their settings are incorrect. They are seeking a solution or advice from someone who may know more about the issue.
  • #1
Tanja
43
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
  • #2
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?
 
  • #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.
 
  • #4
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.
 
  • #5


Hello Tanja,

It sounds like there may be an issue with your linker settings. Have you double-checked that the paths to your libraries and search paths are correct? Also, make sure that the libraries you are trying to link are compatible with MinGW++ and that they are included in your project.

If you have already checked these things and are still having trouble, it may be helpful to provide more specific information about the error message you are receiving and any other steps you have taken to troubleshoot the issue. Additionally, reaching out to the support team for MinGW++ and Halcon may also provide some helpful insights and solutions.

Best of luck with your project!
 

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

1. Why am I having trouble linking Eclipse, MinGW++, and Halcon?

There could be several reasons for this issue. It could be due to compatibility issues between the different software, incorrect installation or configuration of the software, or missing dependencies. It is important to carefully follow the instructions for installing and setting up each software and make sure they are compatible with each other.

2. How can I check if the Eclipse, MinGW++, and Halcon installation is correct?

The best way to check if the installation is correct is to test each software individually. For Eclipse, try creating and running a simple "Hello World" program. For MinGW++, try compiling and running a basic C++ program. For Halcon, try running a simple image processing task. If these individual tests work, then the installation is likely correct.

3. What are some common errors when linking Eclipse, MinGW++, and Halcon?

Some common errors include missing or incorrect library paths, incorrect compiler options, and incompatibility between the software versions. It is important to carefully check the error messages and make sure all necessary libraries and dependencies are included in the project settings.

4. How can I troubleshoot if I still cannot link Eclipse, MinGW++, and Halcon?

If you are still having trouble linking the software, try checking for updates or patches for each software. You can also try reinstalling the software or seeking help from the software's support team or online forums. It may also be helpful to consult with a more experienced programmer or IT specialist.

5. Are there any alternatives to using Eclipse, MinGW++, and Halcon?

Yes, there are other software options for programming and image processing, such as Visual Studio, Dev-C++, and OpenCV. It may be worth exploring these alternatives if you continue to have trouble with the current software setup. Keep in mind that each software has its own set of instructions and requirements, so be sure to carefully follow the instructions for the specific software you choose.

Similar threads

  • Programming and Computer Science
Replies
5
Views
1K
  • Programming and Computer Science
Replies
11
Views
2K
  • Programming and Computer Science
Replies
12
Views
3K
  • Programming and Computer Science
Replies
4
Views
8K
  • Programming and Computer Science
Replies
2
Views
5K
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
2
Views
5K
  • Programming and Computer Science
Replies
6
Views
3K
Replies
1
Views
14K
Back
Top