Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openvino-windows: Raise error LNK2019: unresolved external symbol #18

Open
JustinInAI opened this issue Feb 11, 2020 · 10 comments
Open

Comments

@JustinInAI
Copy link

Clone source code from below link: https://github.com/mlperf/inference_results_v0.5/tree/master/closed/Intel/code/ssd-small/openvino-windows

List LNK2019: unresolved external symbol too much on the Visual Studio 2017.

Did you encounter this symptom? How to solve this issue?

@psyhtest
Copy link

Hi @JustinInAI, I've just sent an email to Intel colleagues in charge of OpenVINO. Hope they can help you soon.

@JustinInAI
Copy link
Author

JustinInAI commented Feb 11, 2020 via email

@attafosu
Copy link

Hi @JustinInAI: At what step do you encounter these errors?
Could you post a sample of the LNK2019 error?

@JustinInAI
Copy link
Author

Hi attafosu,
I refer https://github.com/mlperf/inference_results_v0.5/tree/master/closed/Intel/code/ssd-small/openvino-windows.

Below is reproduce step:

  1. setup environment and download
    pip install absl-py
    git clone --recurse-submodules https://github.com/mlperf/inference.git mlperf_inference
    cd mlperf_inference\loadgen
    git checkout 413dbabcb30dc2ee1fe42e7b8090b37e8144617d
    git pull origin pull/482/head
    git pull origin pull/489/head
    git pull origin pull/502/head

mkdir build && cd build
cmake ..
cmake --build . --config Release

copy Release/mlperf_loadgen.lib ..\

  1. build inference project from dldt
    git clone https://github.com/opencv/dldt.git
    cd c:\dldt\inference-engine
    mkdir build
    open cmake from start menu
    Where is the source code: c:\dldt\inference-engine
    where to build the binaries: c:\dldt\inference-engine\build
    Click Config button
    Click Generate button
    Build All projects and config set as Release.
    Generate cpu_extension.lib in c:\dldt\inference-engine\bin\intel64\Release\cpu_extension.lib
    Generate inference_engine.lib in c:\dldt\inference-engine\bin\intel64\Release\inference_engine.lib

  2. Create & build ov_mlperf project
    cd c:\mlperf_inference
    mkdir ov_mlperf && cd ov_mlperf
    mkdir test
    copy c:\mlperf_inference\loadgen*.h C:\mlperf_inference\ov_mlperf
    copy c:\mlperf_inference\loadgen*.cc C:\mlperf_inference\ov_mlperf
    set "InferenceEngine_DIR=c:\dldt\inference-engine\build"
    set "OpenCV_DIR=c:\dldt\opencv\cmake"
    open cmake from start menu
    Where is the source code: C:/mlperf_inference/ov_mlperf
    Where to build the binaries: C:/mlperf_inference/ov_mlperf/test
    Add below entry in cmake
    DLOADGEN_DIR=C:\mlperf_inference\loadgen
    DBOOST_INCLUDE_DIRS=C:\boost_1_72_0\boost_1_72_0
    DIE_EXTENSION_LIB=C:\dldt\inference-engine\bin\intel64\Release\cpu_extension.lib
    DIE_LIBRARY=C:\mlperf_inference\dldt\inference-engine\bin\intel64\Release\inference_engine.lib
    DIE_SRC_DIR=C:\mlperf_inference\dldt\inference-engine\src
    DCMAKE_BUILD_TYPE=Release
    Click config button
    Click Generate button

  3. Building ov_mlperf projects
    cd C:\mlperf_inference\ov_mlperf\test
    open ALL_BUILD.vcxproj and launch Visual Studio 2017
    Build All projects and config set as Release.

See many LNK2019 error

@psyhtest
Copy link

@JustinInAI Can you copy some of the errors here please? Also, did you really mean to close this ticket?

@JustinInAI JustinInAI reopened this Feb 13, 2020
@JustinInAI
Copy link
Author

JustinInAI commented Feb 13, 2020 via email

@attafosu
Copy link

@JustinInAI A snapshot/sample of the errors would be useful here.
That said, I was able to reproduce a single LNK error (linking x64 ov_mlperf target to x86 mlperf_loadgen.lib). It appears VS2017 generates for target x86 by default.
So I had to regenerate the loadgen solution with:
cmake -G "Visual Studio 15 2017 Win64" ..
cmake --build . --config Release
and then rebuild ov_mlperf.

@psyhtest
Copy link

@JustinInAI Did @attafosu's advice solve your problem please?

@JustinInAI
Copy link
Author

JustinInAI commented Mar 20, 2020 via email

@psyhtest
Copy link

But the new problem is revise some code from include</boost/...> to
include”/boost/...”

What do you mean @JustinInAI ? Can you perhaps provide a diff between the original code that fails to compile and the code that works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants