0
votes

Many question exist about this problem. But I don't undertsand what I do clearly.

I installed aruco_msvc10 from here. Then I integrate vs2010 using below steps:

  1. Create a Win32 console application
  2. Choose Configuration Manager... and add x64 platform
  3. At release,
    3.1. At Configuration Properties ---- C/C++ ---- Additional Include Directories, add aruco_msvc2010/include, msvc2010/include/aruco

    3.2. At Configuration Properties ---- Linker ---- Additional Library Directories, add library folder aruco_msvc2010\lib

    3.3 At configuration field, choose Release mode, add aruco124.lib

  4. . Add aruco_msvc2010\bin to System Environment Path

Then I run my code, I get an error via error LNK2001: unresolved external symbol "public: __cdecl aruco::MarkerDetector::MarkerDetector(void)" (??0MarkerDetector@aruco@@QEAA@XZ)

There is only one main.cpp file on my project.Should I add markerDetector.h file to the project?

Code :

#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2\highgui\highgui.hpp>
#include <aruco\aruco.h>
#include <aruco\cvdrawingutils.h>
using namespace cv;

int main()
{
VideoCapture cap(0); // open the default camera
int iSliderValue1 = 50, iSliderValue2 = 255;
Mat thresholdImage;
Mat frame;
aruco::MarkerDetector marker;
std::cout << "---------------- \n";
return 0;
}
1

1 Answers

0
votes

Some possibilities:

  • You're adding the lib to the release config but are trying to do a debug build

  • The lib you're adding is not matching your build (e.g. debug/release or 32/64 bit mismatch)

  • You're not adding the lib file in the correct place (under Additional Dependencies in Linker)