LNK2019使用矢量时未解析的外部符号 我在Matlab/Simulink中创建了一个S函数,用C++编码。当我尝试使用mex命令从MATLAB生成可执行文件时,我得到一个链接器错误:

LNK2019使用矢量时未解析的外部符号 我在Matlab/Simulink中创建了一个S函数,用C++编码。当我尝试使用mex命令从MATLAB生成可执行文件时,我得到一个链接器错误:,c++,matlab,simulink,mex,C++,Matlab,Simulink,Mex,heatTran1D\u convWalls\u sfun.obj:错误LNK2019:未解析的外部符号“class std::vector> 微软C++ 2010编译器正在使用。我在代码中使用了很多地方的向量类。下面的行包含在我的源文件的顶部: #define S_FUNCTION_NAME heatTran1D_convWalls_sfun #define S_FUNCTION_LEVEL 2 #include "simstruc.h" #include <math.h> #i

heatTran1D\u convWalls\u sfun.obj:错误LNK2019:未解析的外部符号“class std::vector>

微软C++ 2010编译器正在使用。我在代码中使用了很多地方的向量类。下面的行包含在我的源文件的顶部:

#define S_FUNCTION_NAME  heatTran1D_convWalls_sfun
#define S_FUNCTION_LEVEL 2
#include "simstruc.h"
#include <math.h>
#include <vector>
using namespace std;
#定义S#U函数(名称)热传输
#定义S_功能\u级别2
#包括“simstruc.h”
#包括
#包括
使用名称空间std;
此错误是否正确表明无法找到包含向量类的库。如果是,哪个库包含向量类,我可以在我的计算机上的何处找到它,以便我可以在mex命令中向MATLAB提供它的位置。如果不是这个问题,请让我知道您对可能出现的问题的想法em以及如何解决它


提前感谢!!

如何在代码中使用std::vector?如何在代码中使用std::vector?