We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
在使用NCNN构建c++工程时,出现了以下问题,NCNN编译版本为使用simpleocv;在使用ncnn.lib构建动态库时,出现以下报错:
[build] enc.obj : error LNK2019: 无法解析的外部符号 "public: __cdecl ncnn::DataReader::DataReader(void)" (??0DataReader@ncnn@@qeaa@XZ),函数 "public: __cdecl zzz_enc::AesEncryptedReader::AesEncryptedReader(char const *)" (??0AesEncryptedReader@zkrj_enc@@qeaa@PEBD@Z) 中引用了该符号 ....
当构建静态库时,编译正常,运行正常;
当使用ncnn.lib和opencv,一起构建静态库和动态库工程时,一切正常;
使用的cmakelist.txt,代码片段为:
cmake_minimum_required(VERSION 3.10) set(ncnn_DIR **/ncnn/build/install/lib/cmake/ncnn) # build ncnn with simpleocv set(ncnn_include_DIR **/ncnn/build/install/include/ncnn) find_package(ncnn REQUIRED) if ((ncnn_FOUND) AND (DEFINED ncnn_DIR)) message(STATUS "ncnn found (include: ${ncnn_include_DIR})") INCLUDE_DIRECTORIES(${ncnn_include_DIR}) else() message(FATAL_ERROR "ncnn not found") endif() include_directories(${CMAKE_SOURCE_DIR}/include) #add_library(${PROJECT_NAME} STATIC ${SOURCE_FILES}) add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES}) target_compile_definitions(${PROJECT_NAME} PRIVATE ZKRJ_AIGC_DLL_EXPORT) target_compile_definitions(${PROJECT_NAME} PUBLIC USE_NCNN_SIMPLEOCV) target_link_libraries(${PROJECT_NAME} INTERFACE ncnn ) add_executable(main main.cpp) target_link_libraries(main ${PROJECT_NAME})
谢谢一切可能的帮助和建议。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
detail | 详细描述 | 詳細な説明
在使用NCNN构建c++工程时,出现了以下问题,NCNN编译版本为使用simpleocv;在使用ncnn.lib构建动态库时,出现以下报错:
当构建静态库时,编译正常,运行正常;
当使用ncnn.lib和opencv,一起构建静态库和动态库工程时,一切正常;
使用的cmakelist.txt,代码片段为:
谢谢一切可能的帮助和建议。
The text was updated successfully, but these errors were encountered: