Visual c++ 错误LNK2019:未解决的外部错误
我面临LNK2019错误。我有用户定义的头文件-#包括“prograamer.h”,如下面的代码所示。我正在尝试为软件制作“dll”文件 但是当我编译代码时,我遇到了这个恼人的错误。 请参阅下面的代码:Visual c++ 错误LNK2019:未解决的外部错误,visual-c++,lnk2019,Visual C++,Lnk2019,我面临LNK2019错误。我有用户定义的头文件-#包括“prograamer.h”,如下面的代码所示。我正在尝试为软件制作“dll”文件 但是当我编译代码时,我遇到了这个恼人的错误。 请参阅下面的代码: #include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <map>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <map>
//#include "..\..\include\programmer.h"
#include "programmer.h"
using namespace std;
--------------
strucutre definition
--------------
..
// Called once after the network is loaded.
void qpx_NET_postOpen(void)
{
int exit;
qps_GUI_printf("Base Plugin opened succesfully. ");
nLinks = qpg_NET_links();
nLoops = qpg_NET_detectors();
qps_GUI_printf("nLinks: %d", nLinks);
Time = 0;
for(i = 0; i < n; i++)
{
Count[i] = 0;
TotalSpeed[i] = 0.0;
//Initializing the value for Wo[0]
Wo[i] = 0.0;
}
......
...
..
#包括
#包括
#包括
#包括
#包括
#包括
//#包括“.\..\include\programmer.h”
#包括“programmer.h”
使用名称空间std;
--------------
结构定义
--------------
..
//在网络加载后调用一次。
无效qpx\U网络\U后开(无效)
{
int出口;
qps_GUI_printf(“基本插件成功打开”);
nLinks=qpg_NET_links();
nLoops=qpg_NET_检测器();
qps_GUI_printf(“nLinks:%d”,nLinks);
时间=0;
对于(i=0;i
错误:-
1> ----构建已启动:项目:示例8,配置:调试Win32------
1> dllmain.obj:警告LNK4075:由于“/INCREMENTAL:NO”规范而忽略“/EDITANDCONTINUE”
1> 创建库c:\users\ssaidi\documents\visual studio 2010\Projects\sample 8\Debug\sample 8.lib和对象c:\users\ssaidi\documents\visual studio 2010\Projects\sample 8\Debug\sample 8.exp
1> 样本8.obj:错误LNK2019:未解析的外部符号_imp_qpg_NET_函数_qpx_NET_postOpen中引用的检测器
1> 示例8.obj:错误LNK2019:未解析的外部符号_imp_qpg_NET_函数_qpx_NET_postOpen中引用的链接
1> c:\users\ssaidi\documents\visual studio 2010\Projects\sample 8\Debug\sample 8.dll:致命错误LNK1120:2个未解析的外部
============生成:0成功,1失败,0最新,0跳过===========我不熟悉您正在使用的qpx框架,但您的DLL反过来需要与qpx库链接(静态或动态)。这可以在项目属性页的链接器、输入、其他依赖项下指定。从错误中可以看出(从源代码中)编译器可以找到
programmer.h
文件;但是链接器无法找到函数qpg\u NET\u links()
的实际实现。链接器是否可以使用该函数的源代码