GithubHelp home page GithubHelp logo

Comments (6)

gbdjxgp avatar gbdjxgp commented on June 11, 2024

同样按照这个博客中配置环境,系统为windows 11,visual studio2022进行设置https://blog.csdn.net/m0_72734364/article/details/128865904?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22128865904%22%2C%22source%22%3A%22m0_72734364%22%7D&fromshare=blogdetail
编译后报错
严重性 代码 说明 项目 文件 行 禁止显示状态 详细信息
错误 LNK2019 无法解析的外部符号 "class nvinfer1::IBuilder * __cdecl createBuilder(void)" (?createBuilder@@YAPEAVIBuilder@nvinfer1@@xz),函数 "bool __cdecl sample::modelToBuildEnv(class sample::ModelOptions const &,class sample::BuildOptions const &,class sample::SystemOptions &,struct sample::BuildEnvironment &,class std::basic_ostream<char,struct std::char_traits > &)" (?modelToBuildEnv@sample@@YA_NAEBVModelOptions@1@AEBVBuildOptions@1@AEAVSystemOptions@1@AEAUBuildEnvironment@1@AEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@z) 中引用了该符号 yolo C:\code\c++\yolo\yolo\sampleEngines.obj 1
错误 LNK2019 无法解析的外部符号 "class nvinfer1::IRuntime * __cdecl createRuntime(void)" (?createRuntime@@YAPEAVIRuntime@nvinfer1@@xz),函数 "public: class nvinfer1::ICudaEngine * __cdecl sample::LazilyDeserializedEngine::get(void)" (?get@LazilyDeserializedEngine@sample@@QEAAPEAVICudaEngine@nvinfer1@@xz) 中引用了该符号 yolo C:\code\c++\yolo\yolo\sampleEngines.obj 1
错误 LNK2001 无法解析的外部符号 "class nvinfer1::IRuntime * __cdecl createRuntime(void)" (?createRuntime@@YAPEAVIRuntime@nvinfer1@@xz) yolo C:\code\c++\yolo\yolo\sampleInference.obj 1
错误 LNK2019 无法解析的外部符号 "class nvinfer1::IRefitter * __cdecl createRefitter(class nvinfer1::ICudaEngine &)" (?createRefitter@@YAPEAVIRefitter@nvinfer1@@AEAVICudaEngine@2@@z),函数 "void __cdecl sample::dumpRefittable(class nvinfer1::ICudaEngine &)" (?dumpRefittable@sample@@YAXAEAVICudaEngine@nvinfer1@@@z) 中引用了该符号 yolo C:\code\c++\yolo\yolo\sampleEngines.obj 1
错误 LNK2019 无法解析的外部符号 "class nvonnxparser::IParser * __cdecl createONNXParser(class nvinfer1::INetworkDefinition &)" (?createONNXParser@@YAPEAVIParser@nvonnxparser@@AEAVINetworkDefinition@nvinfer1@@@z),函数 "struct sample::Parser __cdecl sample::modelToNetwork(class sample::ModelOptions const &,class sample::BuildOptions const &,class nvinfer1::INetworkDefinition &,class std::basic_ostream<char,struct std::char_traits > &,class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > *)" (?modelToNetwork@sample@@ya?AUParser@1@AEBVModelOptions@1@AEBVBuildOptions@1@AEAVINetworkDefinition@nvinfer1@@aeav?$basic_ostream@DU?$char_traits@D@std@@@std@@peav?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@8@@z) 中引用了该符号 yolo C:\code\c++\yolo\yolo\sampleEngines.obj 1
错误 LNK2019 无法解析的外部符号 "class nvcaffeparser1::ICaffeParser * __cdecl sampleCreateCaffeParser(void)" (?sampleCreateCaffeParser@@YAPEAVICaffeParser@nvcaffeparser1@@xz),函数 "struct sample::Parser __cdecl sample::modelToNetwork(class sample::ModelOptions const &,class sample::BuildOptions const &,class nvinfer1::INetworkDefinition &,class std::basic_ostream<char,struct std::char_traits > &,class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > *)" (?modelToNetwork@sample@@ya?AUParser@1@AEBVModelOptions@1@AEBVBuildOptions@1@AEAVINetworkDefinition@nvinfer1@@aeav?$basic_ostream@DU?$char_traits@D@std@@@std@@peav?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@8@@z) 中引用了该符号 yolo C:\code\c++\yolo\yolo\sampleEngines.obj 1
错误 LNK2019 无法解析的外部符号 "void __cdecl shutdownCaffeParser(void)" (?shutdownCaffeParser@@yaxxz),函数 "public: __cdecl sample::anonymous namespace'::CaffeBufferShutter::~CaffeBufferShutter(void)" (??1CaffeBufferShutter@?A0x3b17950c@sample@@QEAA@XZ) 中引用了该符号 yolo C:\code\c++\yolo\yolo\sampleEngines.obj 1 错误 LNK2019 无法解析的外部符号 "class nvuffparser::IUffParser * __cdecl sampleCreateUffParser(void)" (?sampleCreateUffParser@@YAPEAVIUffParser@nvuffparser@@XZ),函数 "struct sample::Parser __cdecl sample::modelToNetwork(class sample::ModelOptions const &,class sample::BuildOptions const &,class nvinfer1::INetworkDefinition &,class std::basic_ostream<char,struct std::char_traits<char> > &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > *)" (?modelToNetwork@sample@@YA?AUParser@1@AEBVModelOptions@1@AEBVBuildOptions@1@AEAVINetworkDefinition@nvinfer1@@AEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@PEAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@8@@Z) 中引用了该符号 yolo C:\code\c++\yolo\yolo\sampleEngines.obj 1 错误 LNK2019 无法解析的外部符号 "void __cdecl shutdownUffParser(void)" (?shutdownUffParser@@YAXXZ),函数 "public: __cdecl sample::anonymous namespace'::UffBufferShutter::~UffBufferShutter(void)" (??1UffBufferShutter@?A0x3b17950c@sample@@qeaa@XZ) 中引用了该符号 yolo C:\code\c++\yolo\yolo\sampleEngines.obj 1
错误 LNK1120 8 个无法解析的外部命令 yolo C:\code\c++\yolo\yolo\x64\Debug\yolo.exe 1

image

from tensorrt-alpha.

ymhlq avatar ymhlq commented on June 11, 2024

你这个问题解决了吗,老哥,我没使用Cmake编译,但是配置过程中同样报错
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2001 无法解析的外部符号 "class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > __cdecl sample::splitToStringVec(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,char)" (?splitToStringVec@sample@@ya?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@aebv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@3@D@Z) code E:\yolov8_tensor\yolov8\code\sampleOptions.obj 1
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK1120 1 个无法解析的外部命令 code E:\yolov8_tensor\yolov8\x64\Release\code.exe 1

from tensorrt-alpha.

gbdjxgp avatar gbdjxgp commented on June 11, 2024

你这个问题解决了吗,老哥,我没使用Cmake编译,但是配置过程中同样报错 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK2001 无法解析的外部符号 "class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > __cdecl sample::splitToStringVec(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,char)" (?splitToStringVec@sample@@ya?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@aebv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@3@D@Z) code E:\yolov8_tensor\yolov8\code\sampleOptions.obj 1 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK1120 1 个无法解析的外部命令 code E:\yolov8_tensor\yolov8\x64\Release\code.exe 1

一直没有解决呢,我也按照CSDN(https://blog.csdn.net/m0_72734364/article/details/128865904?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22128865904%22%2C%22source%22%3A%22m0_72734364%22%7D&fromshare=blogdetail)上的教程尝试过不用CMAKE编译,同样也是报错

from tensorrt-alpha.

gbdjxgp avatar gbdjxgp commented on June 11, 2024

你这个问题解决了吗,老哥,我没使用Cmake编译,但是配置过程中同样报错 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK2001 无法解析的外部符号 "class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > __cdecl sample::splitToStringVec(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,char)" (?splitToStringVec@sample@@ya?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@aebv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@3@D@Z) code E:\yolov8_tensor\yolov8\code\sampleOptions.obj 1 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK1120 1 个无法解析的外部命令 code E:\yolov8_tensor\yolov8\x64\Release\code.exe 1

我使用CMake编译成功了,你不要把sampleOptions加入到链接过程里应该就可以了

from tensorrt-alpha.

ymhlq avatar ymhlq commented on June 11, 2024

我试试

from tensorrt-alpha.

ymhlq avatar ymhlq commented on June 11, 2024

牛逼,我没用cmake,直接把sample options删掉就编译成功了

from tensorrt-alpha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.