linker-errors

LNK2019: unresolved external symbol in VS unit-testing

守給你的承諾、 提交于 2020-05-26 11:44:27
问题 I get the error as stated in the title. I ensured the following: - The Include directory, include library and additional include directory are set correctly - In the properties, Subsystem is set to CONSOLE Comments to my code: LifeLib is a project that contains classes of that I want to test some methods. The classes are defined in namespace LifeLib. One of them is StornoTafel. testVariables is NOT defined in any namespace. I get the linking error 3 times, for 2 constructors and 1 method in

What is an undefined reference/unresolved external symbol error and how do I fix it?

心已入冬 提交于 2020-05-17 06:06:23
问题 What are undefined reference/unresolved external symbol errors? What are common causes and how to fix/prevent them? Feel free to edit/add your own. 回答1: Compiling a C++ program takes place in several steps, as specified by 2.2 (credits to Keith Thompson for the reference): The precedence among the syntax rules of translation is specified by the following phases [see footnote] . Physical source file characters are mapped, in an implementation-defined manner, to the basic source character set

Cannot use .dll from OpenCV with CMake

懵懂的女人 提交于 2020-05-17 04:24:50
问题 I have the following CMakeLists.txt cmake_minimum_required(VERSION 3.12) project( project_360_visual ) find_package( OpenCV REQUIRED ) set(SOURCE_FILES ${CMAKE_SOURCE_DIR}/src/project_360_visual.cpp ${CMAKE_SOURCE_DIR}/src/projection.cpp) set(INCLUDE_FILES ${CMAKE_SOURCE_DIR}/include/project_360_visual.h ${CMAKE_SOURCE_DIR}/include/projection.h) LINK_DIRECTORIES(c:/opencv/build/bin/Release) add_library(opencv_tracking430 SHARED IMPORTED GLOBAL) set_target_properties(opencv_tracking430

How can I call printf normally in assembly without @PLT but just call printf with -l option in gcc with standard library,

巧了我就是萌 提交于 2020-03-26 06:48:09
问题 I want to call printf in assembly and link it using gcc -l option with standard library, But it says: Symbol `printf' causes overflow in R_X86_64_PC32 relocation Segmentation fault (core dumped) this is How i compile: gcc mod.s -l:libc.so -o mod when I replace libc.so with libc.a, It still shows Sementation fault .file "mod.c" .text .section .rodata .LC0: .string "%d" .text .globl main .type main, @function main: pushq %rbp movq %rsp, %rbp subq $16, %rsp movl $3, -8(%rbp) movl $2, -4(%rbp)

Using cmake to build a static library of static libraries

前提是你 提交于 2020-03-19 06:30:33
问题 I'm trying to create a static library of static libraries. Here's my CMakeLists.txt cmake_minimum_required(VERSION 2.8) project(myRtspClient) add_subdirectory(../third_party/Base64_live555 base64_live555) add_subdirectory(../third_party/md5 md5) add_subdirectory(../third_party/JRTPLIB jrtplib) include_directories(include) include_directories(../third_party/Base64_live555/include) include_directories(../third_party/md5/include) include_directories(jrtplib/src) include_directories(../third

Add CUDA to ROS Package

房东的猫 提交于 2020-02-21 13:08:12
问题 I would like to use cuda within a ros package. Has anyone a simple example for me? I tried to built a static library with the cuda function and add this library to my package, but I get always a linking error: Undefined reference cuda... I have built a executable instead of the library and it works. Please help! 回答1: I found a solution myself: CMakeLists.txt: cmake_minimum_required(VERSION 2.8.3) PROJECT (beginner_tutorials) FIND_PACKAGE(CUDA REQUIRED) find_package(catkin REQUIRED COMPONENTS

Add CUDA to ROS Package

早过忘川 提交于 2020-02-21 13:06:46
问题 I would like to use cuda within a ros package. Has anyone a simple example for me? I tried to built a static library with the cuda function and add this library to my package, but I get always a linking error: Undefined reference cuda... I have built a executable instead of the library and it works. Please help! 回答1: I found a solution myself: CMakeLists.txt: cmake_minimum_required(VERSION 2.8.3) PROJECT (beginner_tutorials) FIND_PACKAGE(CUDA REQUIRED) find_package(catkin REQUIRED COMPONENTS

Add CUDA to ROS Package

那年仲夏 提交于 2020-02-21 13:06:26
问题 I would like to use cuda within a ros package. Has anyone a simple example for me? I tried to built a static library with the cuda function and add this library to my package, but I get always a linking error: Undefined reference cuda... I have built a executable instead of the library and it works. Please help! 回答1: I found a solution myself: CMakeLists.txt: cmake_minimum_required(VERSION 2.8.3) PROJECT (beginner_tutorials) FIND_PACKAGE(CUDA REQUIRED) find_package(catkin REQUIRED COMPONENTS

Add CUDA to ROS Package

假装没事ソ 提交于 2020-02-21 13:05:40
问题 I would like to use cuda within a ros package. Has anyone a simple example for me? I tried to built a static library with the cuda function and add this library to my package, but I get always a linking error: Undefined reference cuda... I have built a executable instead of the library and it works. Please help! 回答1: I found a solution myself: CMakeLists.txt: cmake_minimum_required(VERSION 2.8.3) PROJECT (beginner_tutorials) FIND_PACKAGE(CUDA REQUIRED) find_package(catkin REQUIRED COMPONENTS

Add CUDA to ROS Package

做~自己de王妃 提交于 2020-02-21 13:05:19
问题 I would like to use cuda within a ros package. Has anyone a simple example for me? I tried to built a static library with the cuda function and add this library to my package, but I get always a linking error: Undefined reference cuda... I have built a executable instead of the library and it works. Please help! 回答1: I found a solution myself: CMakeLists.txt: cmake_minimum_required(VERSION 2.8.3) PROJECT (beginner_tutorials) FIND_PACKAGE(CUDA REQUIRED) find_package(catkin REQUIRED COMPONENTS