undefined-reference

    -1热度

    1回答

    有我的重载< <运营商的问题,cygwin的是返回2个错误, DeckOfCardsDemo.o:DeckOfCardsDemo.cpp:(.text+0xd3): undefined reference to `samuel::operator<<(std::ostream&, samuel::DeckOfCards const&)' DeckOfCardsDemo.o:DeckOf

    1热度

    1回答

    我正在运行与gcc的Ubuntu 16.04。 我q.ccp文件是用于编译 #include <google/protobuf/generated_message_util.h> #include <google/protobuf/repeated_field.h> #include <google/protobuf/extension_set.h> #include <google/pro

    0热度

    1回答

    我必须使用另一个静态库构建共享库。在该静态库中,有一些函数调用在nm output中未定义。我想通过获取目标文件来删除这些符号。我无法删除整个对象文件,因为它的一部分被使用。有没有办法做到这一点。 nm output request.o: U CLR_SECURE_MEM_START_ADDR //want to remove U clrSMEMAlloc //wan

    0热度

    1回答

    我试图编译树莓pi 3上的opencv代码。但是,它始终提供“未定义的引用...”错误,我认为有链接问题。 编译: g++ `pkg-config --libs --cflags opencv` Face_Detection.cpp pkg配置的OpenCV --libs: -L/opt/lib/ -L/opt/Deneme/opencv/a/ -opencv_calib3d -opencv_

    0热度

    1回答

    我用wx-config --libs生成我的应用程序的连接参数,输出如下: -L/usr/lib/x86_64-linux-gnu -pthread -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu

    0热度

    1回答

    我正在研究一个简单的C++项目来实现一个Heap类并使用它的函数。我已经写出了大部分代码,当我尝试了一些函数时,控制台会告诉我,当我尝试编译时,我有没有引用的符号。以下是代码。 Heap.h: #ifndef HEAP_H #define HEAP_H template<typename T> class Heap { T arr[100]; int heapS

    2热度

    1回答

    我在文件rsatest.c中有以下代码。我正在尝试生成一个RSA密钥对。 #include <openssl/rsa.h> #include <openssl/pem.h> int main(){ RSA *rsa = RSA_generate_key((const int) 1024,(const int) 3, 0, 0); return 0; } 我与 gcc

    0热度

    1回答

    这里是我的包括: #include <iostream> #include <string> #include <cstring> #include <stdio.h> //for snprintf #include <libscrypt.h> #include <sqlite3.h> #include "generator.h" //has no dependencies 这是我

    0热度

    2回答

    嵌入式系统的开发强加了另一种编码方式。 为了最大限度地减少名为RF24Wave的库的大小,我将调整我的主类的结构。 这个想法是在我的程序库包含在主程序中的时候声明某些函数只有在某些#define的存在。 流行的库,如MySensor使用这种方式来最大限度地减少内存占用。 所以,我有我的库中有两个文件: RF24Wave.h:头文件包含函数声明 #ifndef __RF24WAVE_H #defi

    0热度

    1回答

    这个必须已经回答了一百万次,但我找不到合适的解决方案。 我在sensor.cpp定义的免费功能: std::string printTargetGasName(enalu::CombThreshold::TargetGas){} 然后我就声明了函数的原型 在sensor.hpp std::string printTargetGasName(enalu::CombThreshold::Targe