-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
win10+yolov5 MSB3721 error!!! #792
Comments
add |
use this code `cmake_minimum_required(VERSION 2.6) project(yolov5) set(OpenCV_DIR "D:\01Tools\opencv4.5.4\build") #2 add_definitions(-DAPI_EXPORTS) option(CUDA_USE_STATIC_CUDA_RUNTIME OFF) set(THREADS_PREFER_PTHREAD_FLAG ON) setup CUDAfind_package(CUDA REQUIRED) include_directories(${CUDA_INCLUDE_DIRS}) enable_language(CUDA) # add this line, then no need to setup cuda path in vs include_directories(${PROJECT_SOURCE_DIR}/include) #11 -D_MWAITXINTRIN_H_INCLUDED for solving error: identifier "__builtin_ia32_mwaitx" is undefinedset(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Ofast -D_MWAITXINTRIN_H_INCLUDED") setup opencvfind_package(OpenCV QUIET message(STATUS "OpenCV library status:") add_executable(yolov5 ${PROJECT_SOURCE_DIR}/yolov5.cpp ${PROJECT_SOURCE_DIR}/common.hpp ${PROJECT_SOURCE_DIR}/yololayer.cu ${PROJECT_SOURCE_DIR}/yololayer.h) #17 target_link_libraries(yolov5 "nvinfer" "nvinfer_plugin") #18 ` |
这个问题解决了吗 |
解决了,使用下面的CMakeLists.txt ` project(yolov5) set(OpenCV_DIR "D:\01Tools\opencv4.5.4\build") #2 add_definitions(-DAPI_EXPORTS) set(THREADS_PREFER_PTHREAD_FLAG ON) setup CUDAfind_package(CUDA REQUIRED) include_directories(${CUDA_INCLUDE_DIRS}) enable_language(CUDA) # add this line, then no need to setup cuda path in vs include_directories(${PROJECT_SOURCE_DIR}/include) -D_MWAITXINTRIN_H_INCLUDED for solving error: identifier "__builtin_ia32_mwaitx" is undefinedset(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Ofast -D_MWAITXINTRIN_H_INCLUDED") setup opencvfind_package(OpenCV QUIET message(STATUS "OpenCV library status:") include_directories(${OpenCV_INCLUDE_DIRS}) add_executable(yolov5 ${PROJECT_SOURCE_DIR}/yolov5.cpp ${PROJECT_SOURCE_DIR}/yololayer.cu ${PROJECT_SOURCE_DIR}/yololayer.h) #4 target_link_libraries(yolov5 "nvinfer" "nvinfer_plugin") #5 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
严重性 代码 说明 项目 文件 行 禁止显示状态 我想请问下我按照上面的cmakelist.txt添加了选项,但是还是报错,请问怎么解决呢。 |
严重性 代码 说明 项目 文件 行
错误 MSB3721 命令“"D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nvcc.exe" -gencode=arch=compute_30,code="sm_30,compute_30" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" -x cu -I"D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include" -IJ:\yolov5\tensorrtx\yolov5\include -I"J:\yolov5\TensorRT-7.2.3.4\include" -I"J:\opencv-4.5.4\build" -I"J:\opencv-4.5.4\include" -I"J:\opencv_contrib-master\modules\cudev\include" -I"J:\opencv-4.5.4\modules\core\include" -I"J:\opencv_contrib-master\modules\cudaarithm\include" -I"J:\opencv-4.5.4\modules\flann\include" -I"J:\opencv-4.5.4\modules\imgproc\include" -I"J:\opencv_contrib-master\modules\intensity_transform\include" -I"J:\opencv-4.5.4\modules\ml\include" -I"J:\opencv_contrib-master\modules\phase_unwrapping\include" -I"J:\opencv_contrib-master\modules\plot\include" -I"J:\opencv_contrib-master\modules\quality\include" -I"J:\opencv_contrib-master\modules\reg\include" -I"J:\opencv_contrib-master\modules\surface_matching\include" -I"J:\opencv_contrib-master\modules\cudafilters\include" -I"J:\opencv_contrib-master\modules\cudaimgproc\include" -I"J:\opencv_contrib-master\modules\cudawarping\include" -I"J:\opencv-4.5.4\modules\dnn\include" -I"J:\opencv_contrib-master\modules\dnn_superres\include" -I"J:\opencv-4.5.4\modules\features2d\include" -I"J:\opencv_contrib-master\modules\fuzzy\include" -I"J:\opencv_contrib-master\modules\hfs\include" -I"J:\opencv-4.5.4\modules\imgcodecs\include" -I"J:\opencv_contrib-master\modules\line_descriptor\include" -I"J:\opencv-4.5.4\modules\photo\include" -I"J:\opencv_contrib-master\modules\saliency\include" -I"J:\opencv_contrib-master\modules\text\include" -I"J:\opencv-4.5.4\modules\videoio\include" -I"J:\opencv_contrib-master\modules\wechat_qrcode\include" -I"J:\opencv_contrib-master\modules\xphoto\include" -I"J:\opencv_contrib-master\modules\barcode\include" -I"J:\opencv-4.5.4\modules\calib3d\include" -I"J:\opencv_contrib-master\modules\cudacodec\include" -I"J:\opencv_contrib-master\modules\cudafeatures2d\include" -I"J:\opencv_contrib-master\modules\cudastereo\include" -I"J:\opencv_contrib-master\modules\datasets\include" -I"J:\opencv-4.5.4\modules\highgui\include" -I"J:\opencv_contrib-master\modules\mcc\include" -I"J:\opencv-4.5.4\modules\objdetect\include" -I"J:\opencv_contrib-master\modules\rapid\include" -I"J:\opencv_contrib-master\modules\rgbd\include" -I"J:\opencv_contrib-master\modules\shape\include" -I"J:\opencv_contrib-master\modules\structured_light\include" -I"J:\opencv-4.5.4\modules\video\include" -I"J:\opencv_contrib-master\modules\xfeatures2d\include" -I"J:\opencv_contrib-master\modules\ximgproc\include" -I"J:\opencv_contrib-master\modules\xobjdetect\include" -I"J:\opencv_contrib-master\modules\aruco\include" -I"J:\opencv_contrib-master\modules\bgsegm\include" -I"J:\opencv_contrib-master\modules\bioinspired\include" -I"J:\opencv_contrib-master\modules\ccalib\include" -I"J:\opencv_contrib-master\modules\cudabgsegm\include" -I"J:\opencv_contrib-master\modules\cudalegacy\include" -I"J:\opencv_contrib-master\modules\cudaobjdetect\include" -I"J:\opencv_contrib-master\modules\dnn_objdetect\include" -I"J:\opencv_contrib-master\modules\dpm\include" -I"J:\opencv_contrib-master\modules\face\include" -I"J:\opencv-4.5.4\modules\gapi\include" -I"J:\opencv_contrib-master\modules\optflow\include" -I"J:\opencv-4.5.4\modules\stitching\include" -I"J:\opencv_contrib-master\modules\tracking\include" -I"J:\opencv_contrib-master\modules\cudaoptflow\include" -I"J:\opencv_contrib-master\modules\stereo\include" -I"J:\opencv_contrib-master\modules\superres\include" -I"J:\opencv_contrib-master\modules\videostab\include" -I"J:\opencv-4.5.4\modules\world\include" -I"J:\opencv_contrib-master\modules\img_hash\include" -I"J:\opencv-4.5.4\modules\ts\include" -I"D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -std=c++11 -Xcompiler="/EHsc -Ob2" -D_WINDOWS -DNDEBUG -D"CMAKE_INTDIR="Release"" -DWIN32 -D_WINDOWS -D_MWAITXINTRIN_H_INCLUDED -DNDEBUG -D"CMAKE_INTDIR="Release"" -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /Fdyolov5.dir\Release\vc140.pdb /FS /Zi /MD /GR" -o yolov5.dir\Release\yololayer.obj "J:\yolov5\tensorrtx\yolov5\yololayer.cu"”已退出,返回代码为 1。 yolov5 D:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\CUDA 10.2.targets 764
严重性 代码 说明 项目 文件 行
错误 member "nvinfer1::YoloPluginCreator::mFC" may not be initialized yolov5 J:\yolov5\tensorrtx\yolov5\yololayer.cu 261
The text was updated successfully, but these errors were encountered: