问答 2020-06-08 来自:开发者社区

C++编译报错:error LNK2019: 无法解析的外部符号 "public?报错

#include #include #include using namespace std; class myComplex{    private:  double real;  double imag;     public:  myComplex(); ~myComplex(){} myComplex(int a){ r...

问答 2016-06-07 来自:开发者社区

c++引用c函数时,报错误 error LNK2001: 无法解析的外部符号

我的c头文件是这么写的 #ifdef __cplusplus extern "C" { #endif extern int shmdb_initParent(STHashShareHandle *handle,unsigned int size); #ifdef __cplusplus } #endif 我的c++代码是这么写的 //引用头文件 extern "C" { #inc...

问答 2016-06-06 来自:开发者社区

node c++扩展引用引用静态库中函数提示 error LNK2001: 无法解析的外部符号 问题

最近在写一个node.js的扩展项目,发现了一个问题,我本来吧c代码在windows下做成一个静态库lib文件,可是在node.js扩展中调用其中的lib文件中的函数死活不能编译成功,报error LNK2001: 无法解析的外部符号。但是如果我不是用调用静态库的方式,直接把代码放入到node.js的扩展项目中一起编译竟能编译成功。我试了各种方法,死活找不到解决方法。我出错时的gpy配置文件: ....

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

开发与运维

集结各类场景实战经验,助你开发运维畅行无忧

+关注