error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)(转)
原文转自:http://blog.sina.com.cn/s/blog_639a2ad70101kpen.html
编译directshow若干问题的解决
use vs2005 compiler directshow baseclasses has something error
1.ctlutil.h
modify as below:
//operator=(LONG);
COARefTime& operator=(LONG);
2.winutil.cpp
modify as below:
UINT Count;
for (Count = 0;Count < Result;Count++) {
3.outputq.cpp
modify as below:
long iDone;
for (iDone = 0;
4.wxdebug.cpp
modify as below:
//static g_dwLastRefresh = 0;
static DWORD g_dwLastRefresh = 0;
如果編譯程式出現
error LNK2019: 無法解析的外部符號 "int __stdcall lstrcmpWInternal
error LNK2019: 無法解析的外部符號 "int __cdecl wsprintfWInternal
error LNK2019: 無法解析的外部符號 "int __stdcall lstrcmpiWInternal
之類的錯誤
這是baseclasses編譯時有個設定要變更
就是project屬性->組態屬性->C/C++->語言之下的 "將wchar_t當作Built-in型別" 設為false
就可以解決上述link error的問題
如果編譯程式link strmbase.lib or strmbasd.lib出現以下的error
strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)strmbasd.lib(dllsetup.obj) : error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)
则重新修改baseclasses project的内容
CFactoryTemplate g_Templates[1] = {
{ L"SystemClock", &CLSID_SystemClock, CSystemClock::CreateInstance} //修改后;
// {&CLSID_SystemClock, CSystemClock::CreateInstance} //原本的;
};
另外在baseclasses工程的 vc Project->Settings...->C/C++的 preprocessor definitions:加入FILTER_DLL
然后重新编译 strmbase.lib and strmbasd.lib 即可
error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)(转)的更多相关文章
- 混合编程:error LNK2001: unresolved external symbol
Vs2006+matlab2010rb环境: 1:工具-选项-项目解决方案-VC++目录设置include和lib的路径 2:项目-属性-属性配置-链接器-输入-附加依赖项把库的名字添加进去 VIST ...
- VC++ : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>
最近学习Google Breakpad,将其用在了自己的项目中,编译的版本为VS2010,没有什么问题.但是为了和之前的程序兼容,需要使用VS2008版本的程序,于是又编译了VS2008版本的代码,但 ...
- [异常] VC6.0 error LNK2001: unresolved external symbol _main解决办法
来自:http://www.douban.com/note/65638800/ 学习VC++时经常会遇到链接错误LNK2001,该错误非常讨厌,因为对于编程者来说,最好改的错误莫过于编译错误,而一般说 ...
- VC6.0 error LNK2001: unresolved external symbol _main解决办法
学习VC++时经常会遇到链接错误LNK2001,该错误非常讨厌,因为对于编程者来说,最好改的错误莫过于编译错误,而一般说来发生连接错误时,编译都已通过.产生连接错误的原因非常多,尤其LNK2001错误 ...
- (转载)浅析error LNK2001: unresolved external symbol "public: __thisc...
学习VC++时经常会遇到链接错误LNK2001,该错误非常讨厌,因为对于 编程者来说,最好改的错误莫过于编译错误,而一般说来发生连接错误时, 编译都已通过.产生连接错误的原因非常多 ...
- MASMPlus编译出错:error LNK2001: unresolved external symbol _WinMainCRTStartup
初学汇编,感觉很多不懂.不过那也是,如果懂了的话就不用学了,从无到有学习一门编程语言果然不是那么容易的一件事. 学习汇编总得要有一款汇编软件才行,没理由只是使用Windows自带的DEBUG.于是上了 ...
- error LNK2001: unresolved external symbol _main
想运行一个网上下载的opengl离屏渲染(渲染到纹理FBO)的程序,然后一直报错 error LNK2001: unresolved external symbol _main 解决了一下午终于弄明白 ...
- VC6.0 error LNK2001: unresolved external symbol __imp__ntohl@4
--------------------Configuration: oxToint1 - Win32 Debug-------------------- Linking... main.obj : ...
- error LNK2001: unresolved external symbol @__security_check_cookie
Q:VS2005编译的静态库, 在vc++6.0中连接出现错误 error LNK2001: unresolved external symbol @__security_check_cookie@l ...
随机推荐
- POJ:2566-Bound Found(尺取变形好题)
Bound Found Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 5408 Accepted: 1735 Special J ...
- Nginx模块详解
Nginx模块介绍 核心模块:core module 标准模块: HTTP modules: Standard HTTP modules Optional HTTP modules Mail modu ...
- RegisterWindowMessage
RegisterWindowMessage function Defines a new window message that is guaranteed to be unique throug ...
- 网易OpenStack部署运维实战
OpenStack自2010年项目成立以来,已经有超过200个公司加入了 OpenStack 项目,目前参与 OpenStack 项目的开发人员有 17,000+,而且这些数字还在增加,作为一个开源的 ...
- 用 Flask 来写个轻博客
用 Flask 来写个轻博客 用 Flask 来写个轻博客 (1) — 创建项目 用 Flask 来写个轻博客 (2) — Hello World! 用 Flask 来写个轻博客 (3) — (M)V ...
- C# 6.0/7.0 的新特性
转眼C#语言都已经迭代到7.0版本了,很多小伙伴都已经把C# 7.0 的新特性应用到代码中了,想想自己连6.0的新特性都还很少使用,今天特意搜集了一下6.0和7.0的一些新特性,记录一下,方便查阅. ...
- 最“高大上”的Spring测试:Spring Test
我想给大家介绍一款非常实用.且高端大气上档次的spring测试,在这里,我要强烈推荐使用Spring的Test Context框架,为什么呢?俗话说,“货比三家不上当”,要搞清楚这个问题,我们先来看一 ...
- 《Cracking the Coding Interview》——第3章:栈和队列——题目4
2014-03-18 05:28 题目:你肯定听过汉诺威塔的故事:三个柱子和N个从小到大的盘子.既然每次你只能移动放在顶上的盘子,这不就是栈操作吗?所以,请用三个栈来模拟N级汉诺威塔的玩法.放心,N不 ...
- Python 3基础教程14-在文件尾部更新内容
本文介绍在一个已经存在的文件尾部添加内容,还是用到write方法. 这里exampleFile.txt是前面文件创建的文件,里面有两行文字.
- sql 删除重复的类型并且时间相同的项
delete RemoteDetection WHERE REMOTEDETECTIONID IN ( select ID from ( select MIN(REMOTEDETECTIONID) I ...