vs学习过程中遇见的各种问题
1. argument to type "char *"is incompatible with parameter of type "LPWSTR"
解决:Project->Properties->Configuration Properties->General->Character set->use Multi-Byte Character Set
2. 'LoadLibraryW' cannot convert parameter 1 from 'const char[]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast,C-style cast or function-style case
解决方法:同上
3. Release编译设置
Project->Properties->Configuration Properties->General->Use of MFC->use MFC in a Static Library
4. declaration is incompatible with就是在申明函数库那里很多函数标红,显示和定义不符
解决:把头文件位置换一下
5. 出现错误My_lame\My_lame\Release\lame_enc.dll:fatal error LNK1107:invalid or corrupt file:cannot read at 0x278
导致错误的原因:在写将WAV格式视频压缩成MP3格式代码的时候,设置Project->Properties->Configuration Properties->Linker->Input->Additional Dependencies时添加了lame_enc.dll。实际上这一栏是添加LIB文件的。所以不应该改变。
6. precompiled header file is from a previous version of the compiler,or the precompiler header is c++ and you are using it from c(or vice verse)
导致错误的原因:在编程的原文件夹中加入BladeMP3EncDLL.c及.h .def文件就好,而在vs2010中右边的Solution Explorer的 header files source files不需要添加。