【转】strmbasd.lib(dllentry.obj) : error LNK2001: 无法解析的外部符号"int g_cTemplates"
加入了DirectShow的基类链接库后,如果此时编译就会出现以下编译错误:
strmbasd.lib(wxutil.obj) : error LNK2019: 无法解析的外部符号 __imp__timeGetTime@0
strmbasd.lib(wxutil.obj) : error LNK2019: 无法解析的外部符号 __imp__timeSetEvent@20
strmbasd.lib(dllentry.obj) : error LNK2001: 无法解析的外部符号 "class CFactoryTemplate *
g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)
strmbasd.lib(dllentry.obj) : error LNK2001: 无法解析的外部符号 "int g_cTemplates"
解决的办法是:
1、在附加依赖项中再加入winmm.lib链接库文件,这样将不会再出现error LNK2019的编译错误。
2、在项目的TestOcxCtrl.h头文件的后面添加如下的代码将消除error LNK2001的编译错误:
extern "C"
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return AfxDllGetClassObject(rclsid, riid, ppv);
}
/////////////////////////////////////////////////////////////////////////////
// DllCanUnloadNow
extern "C"
STDAPI DllCanUnloadNow(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return AfxDllCanUnloadNow();
}
【转】strmbasd.lib(dllentry.obj) : error LNK2001: 无法解析的外部符号"int g_cTemplates"的更多相关文章
- vs2015编译ffmpeg 出现错误rtmp.lib(rtmp.obj) : error LNK2001: 无法解析的外部符号 ___iob_func
vs2015编译ffmpeg(版本3.0.2)引用外部库文件librtmp出现以下错误: rtmp.lib(rtmp.obj) : error LNK2001: 无法解析的外部符号 __imp__st ...
- MSVCRTD.lib(mfc.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainC (转)
一.问题描述 我所使用的编程环境:VS2010 出现的问题如下: MSVCRTD.lib(mfc.obj) : error LNK2019: 无法解析的外部符号_WinMain@16,该符号在函数 _ ...
- 【转】MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainC
@2018-12-18 [小记] vs-2013 编译 cJSON code in git-hub 时遇见问题 error LNK2019,解决如下 [问题描述]MSVCRTD.lib(crtexew ...
- 引用rtmp编译报错:rtmp.obj : error LNK2001: 无法解析的外部符号 __imp__timeGetTime@0
如题vs下引用librtmp的时候报错:rtmp.obj : error LNK2001: 无法解析的外部符号 __imp__timeGetTime@0 在link 里加入 winmm.lib 就可以 ...
- MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16
1.问题描述做开源项目时,碰到VS2010报错如下:MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___ ...
- VS2015+OpenGL4.0开发编译时弹出错误:glaux.lib(tk.obj) : error LNK2019: 无法解析的外部符号 _sscanf,该符号在函数 _GetRegistrySysColors@8 中被引用
一.问题描述: VS2015+OpenGL4.0开发编译时弹出如下所示的错误: 1>glaux.lib(tk.obj) : error LNK2019: 无法解析的外部符号 _sscanf,该符 ...
- qtmaind.lib(qtmain_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CommandLineToArgvW,该符号在函数 WinMain 中被引用
报错:qtmaind.lib(qtmain_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CommandLineToArgvW,该符号在函数 WinMain 中被 ...
- C++:MSVCRTD.lib(crtexe.obj) : error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStart
在VS2013中Build一个C++程序报这个错,解决方案如下: 在解决方案管理器中选择该项目,项目/属性/连接器/系统/子系统 把控制台 (/SUBSYSTEM:CONSOLE)改为 窗口 (/SU ...
- LIBCMTD.lib(wincrt0.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用
无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用 出现原因: 连接程序在负责连接可执行程序时,选择相应的c/c++运行时启动函数.如果设定了/s ...
随机推荐
- 59 Cookie 与 Session
Cookie Cookie是由服务器创建,然后通过响应发送给客户端的一个键值对. 客户端会保存Cookie,并会标注出Cookie的来源(哪个服务器的Cookie). 当客户端向服务器发出请求时会把所 ...
- python2.7 目录下没有scripts
1.python2.7 配置环境完成或,python目录下没有scripts目录,先下载setuptools,cmd下载该目录下,输入python setup.py install 2.完成后,pyt ...
- Merge K Sorted List(含Merge Two Sorted LIst) leetcode java
问题描述: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complex ...
- (CCPC-Final 2018)K - Mr. Panda and Kakin
题意:x是\([1e5,1e9]\)的随机数,p是小于x的最大素数,q是大于等于x的最小素数,\(n=pq\),\(c=f^{2^{30}+3}\mod{n}\),给n和c求f 题解:rsa解密,首先 ...
- CSU OJ 1340 A Sample Problem
Description My girlfriend loves 7 very much, she thinks it is lucky! If an integer contains one or m ...
- windows 系统使用 git 和码云管理代码(本地已有项目)
1. 为本地项目创建本地仓 找到项目所在的根目录(目录下有解决方案那个),右击目录,点击右键菜单中的“Git Bash Here”(前提是你的电脑已经装了Git,我用的是TortoiseGit) 然后 ...
- 十七、Spring框架(IOC/DI)
一.Spring框架 Spring是一个基于IOC和AOP的结构J2EE系统的框架. 1.IOC反转控制是Spring的基础(Inversion Of Control).也就是说创建对象由以前的程序员 ...
- Apache支持TRACE请求漏洞处理方案
trace和get一样是http的一种请求方法,该方法的作用是回显收到的客户端请求,一般用于测试服务器运行状态是否正常. 该方法结合浏览器漏洞可能造成跨站脚本攻击.修复方法如下: 编缉/etc/htt ...
- S3cmd命令行管理对象存储
我的使用步骤 cd /usr/ 目录 git clone https://github.com/jdcloud-cmw/s3cmd.git 下载文件 ln -s /usr/s3cmd/s3c ...
- oracle servicename 与SID的区别
http://blog.csdn.net/z69183787/article/details/25706269