本人已经安装了VS2010,但是同事给的项目是用VC2008写的,用到几个lib文件,路径也都正确,但就是无法正确解析,所以我怀疑是lib库生成的环境问题。所以考虑装个VC2008。但是我又不敢直接安装VS2008,怕破坏VS2010的环境,所以在网上找了个VC2008绿色精简版的包,下载地址:http://d1.amobbs.com/bbs_upload782111/files_50/ourdev_710509KTJTYR.rar,下载后根据说明进行安装,修改了必要的路径后,一切都很顺利。

但是编译程序出现标题中那种错误,真是莫名其妙。后来写了个Hello world程序,发现还是一样的问题。找来找去,摸索了很久,最终发现几个环境变量有问题,导致无法正确找到编译器及include目录等。

参考了下vc2010的安装目录,发现下载的这个包解压后的目录结构存在问题,难怪安装后不行。

调整目录结构,将以下目录移动到VC目录下:atlmfc、bin、crt、include、lib、redist,调整后的目录结构为:

D:\MICROSOFT\VC2008
├─Common7
│  ├─IDE
│  │  ├─2052
│  │  ├─ExceptionAssistantContent
│  │  │  └─2052
│  │  ├─Extensibility Projects
│  │  │  ├─CSharp
│  │  │  │  └─2052
│  │  │  ├─csharp-shared
│  │  │  ├─MCpp
│  │  │  │  └─2052
│  │  │  ├─VBasic
│  │  │  │  └─2052
│  │  │  ├─vbasic-shared
│  │  │  ├─VCATL
│  │  │  │  └─2052
│  │  │  └─vcatl-shared
│  │  ├─ItemTemplatesCache
│  │  ├─MacroProjectItems
│  │  ├─MacroProjects
│  │  ├─NewFileItems
│  │  ├─NewScriptItems
│  │  ├─PrivateAssemblies
│  │  │  ├─1033
│  │  │  ├─2052
│  │  │  └─zh-CHS
│  │  ├─Profiles
│  │  ├─ProjectTemplatesCache
│  │  ├─PublicAssemblies
│  │  │  ├─zh-CHS
│  │  │  └─zh-CN
│  │  ├─SolutionTemplates
│  │  ├─Themes
│  │  ├─VS SCC
│  │  │  └─2052
│  │  ├─Xml
│  │  │  ├─2052
│  │  │  └─zh-CHS
│  │  ├─zh-CHS
│  │  └─zh-CN
│  ├─Packages
│  │  ├─1033
│  │  │  └─schemas
│  │  ├─2052
│  │  │  └─schemas
│  │  │      └─CSS
│  │  ├─Debugger
│  │  │  ├─2052
│  │  │  ├─Visualizers
│  │  │  │  ├─Original
│  │  │  │  └─zh-CHS
│  │  │  └─x86
│  │  └─schemas
│  │      ├─html
│  │      └─xml
│  │          └─2052
│  └─Tools
│      ├─2052
│      ├─Deployment
│      │  ├─2052
│      │  ├─VsdDialogs
│      │  │  ├─0
│      │  │  ├─1028
│      │  │  ├─1031
│      │  │  ├─1033
│      │  │  ├─1036
│      │  │  ├─1040
│      │  │  ├─1041
│      │  │  ├─1042
│      │  │  ├─1046
│      │  │  ├─1049
│      │  │  ├─2052
│      │  │  └─3082
│      │  ├─VsdProjects
│      │  ├─VsdSchema
│      │  └─Vspkgs
│      │      └─2052
│      ├─Templates
│      │  ├─Database Project Items
│      │  └─Database Projects
│      └─VDT
│          └─2052
├─PlatformSDK
│  ├─Include
│  │  └─gl
│  └─Lib
├─ReportViewer
│  ├─zh-CHS
│  └─zh-CN
├─SDK
│  └─V6.0A
│      ├─bin
│      │  ├─en-us
│      │  ├─msitools
│      │  │  ├─Schemas
│      │  │  │  └─MSI
│      │  │  │      ├─100
│      │  │  │      ├─110
│      │  │  │      ├─120
│      │  │  │      └─intl
│      │  │  └─Templates
│      │  │      └─MSI
│      │  ├─vsstools
│      │  └─zh-CHS
│      └─Bootstrapper
│          ├─Engine
│          │  ├─de
│          │  ├─en
│          │  ├─es
│          │  ├─fr
│          │  ├─it
│          │  ├─ja
│          │  ├─ko
│          │  ├─pt-BR
│          │  ├─ru
│          │  ├─zh-CHS
│          │  └─zh-CHT
│          ├─Packages
│          │  ├─DotNetFX
│          │  │  └─zh-CHS
│          │  ├─DotNetFX30
│          │  │  └─zh-CHS
│          │  ├─DotNetFX35
│          │  │  └─zh-CHS
│          │  ├─ReportViewer
│          │  │  └─zh-CHS
│          │  ├─SqlExpress
│          │  │  └─zh-CHS
│          │  ├─VBPowerPacks
│          │  │  └─zh-CHS
│          │  ├─vcredist_x64
│          │  │  └─zh-CHS
│          │  ├─vcredist_x86
│          │  │  └─zh-CHS
│          │  ├─VSTOR30
│          │  │  └─zh-chs
│          │  └─WindowsInstaller3_1
│          │      └─zh-CHS
│          └─Schemas
├─System
│  ├─assembly
│  ├─Common Files
│  │  ├─CAPICOM
│  │  ├─Designer
│  │  ├─Merge Modules
│  │  ├─MSDesigners8
│  │  │  └─Resources
│  │  │      └─2052
│  │  ├─MSEnv
│  │  │  ├─2052
│  │  │  ├─PublicAssemblies
│  │  │  │  └─zh-CN
│  │  │  └─zh-CHS
│  │  ├─MSI Tools
│  │  ├─SQL Debugging
│  │  ├─Visual Database Tools
│  │  ├─VS7Debug
│  │  │  └─2052
│  │  ├─VSA
│  │  │  └─9.0
│  │  │      ├─Common
│  │  │      │  ├─2052
│  │  │      │  └─VSAProjectItems
│  │  │      │      └─Project Items
│  │  │      └─VsaEnv
│  │  │          ├─2052
│  │  │          ├─Packages
│  │  │          │  ├─2052
│  │  │          │  └─Debugger
│  │  │          │      └─2052
│  │  │          ├─SolutionTemplates
│  │  │          └─zh-CHS
│  │  ├─VsDeploy
│  │  └─WMI
│  ├─symbols
│  │  └─dll
│  └─System32
│      └─2052
├─VC
│  ├─atlmfc
│  │  ├─include
│  │  │  ├─l.chs
│  │  │  ├─l.cht
│  │  │  └─res
│  │  ├─lib
│  │  └─src
│  │      ├─atl
│  │      │  └─atls
│  │      │      └─INTEL
│  │      ├─mfc
│  │      │  ├─intel
│  │      │  ├─l.chs
│  │      │  └─l.cht
│  │      └─mfcm
│  │          ├─INTEL
│  │          └─interfaces
│  ├─bin
│  │  ├─2052
│  │  └─zh-CHS
│  ├─crt
│  │  └─src
│  │      ├─cliext
│  │      ├─intel
│  │      │  ├─dll_lib
│  │      │  │  ├─clr_obj
│  │      │  │  └─pure_obj
│  │      │  ├─mt_lib
│  │      │  ├─xdll_lib
│  │      │  │  ├─clr_obj
│  │      │  │  └─pure_obj
│  │      │  └─xmt_lib
│  │      ├─msclr
│  │      │  └─com
│  │      └─sys
│  ├─include
│  │  ├─cliext
│  │  ├─CodeAnalysis
│  │  ├─msclr
│  │  │  └─com
│  │  └─sys
│  ├─lib
│  ├─redist
│  │  ├─Debug_NonRedist
│  │  │  └─x86
│  │  │      ├─Microsoft.VC90.DebugCRT
│  │  │      ├─Microsoft.VC90.DebugMFC
│  │  │      └─Microsoft.VC90.DebugOpenMP
│  │  └─x86
│  │      ├─Microsoft.VC90.ATL
│  │      ├─Microsoft.VC90.CRT
│  │      ├─Microsoft.VC90.MFC
│  │      ├─Microsoft.VC90.MFCLOC
│  │      └─Microsoft.VC90.OPENMP
│  ├─VCAddClass
│  │  ├─ATL
│  │  │  └─WMI
│  │  ├─Generic
│  │  ├─MFC
│  │  └─VCNet
│  ├─VCContextItems
│  ├─VCNewItems
│  ├─VcPackages
│  │  └─2052
│  ├─VCProjectDefaults
│  ├─VcProjectitems
│  │  ├─Code
│  │  ├─Data
│  │  ├─PropertySheets
│  │  ├─Resource
│  │  ├─UI
│  │  ├─Utility
│  │  └─Web
│  ├─VcProjects
│  │  ├─ATL
│  │  ├─General
│  │  ├─MFC
│  │  ├─vcNET
│  │  └─Win32
│  ├─VCResourceTemplates
│  │  └─2052
│  └─VCWizards
│      ├─1033
│      │  └─Images
│      ├─2052
│      ├─AppWiz
│      │  ├─.NET
│      │  │  ├─ClassLibrary
│      │  │  │  ├─Scripts
│      │  │  │  │  └─2052
│      │  │  │  └─Templates
│      │  │  │      └─2052
│      │  │  ├─Console
│      │  │  │  ├─Scripts
│      │  │  │  │  └─2052
│      │  │  │  └─Templates
│      │  │  │      └─2052
│      │  │  ├─ControlLibrary
│      │  │  │  ├─scripts
│      │  │  │  │  └─2052
│      │  │  │  └─templates
│      │  │  │      └─2052
│      │  │  ├─EmptyProject
│      │  │  │  └─Scripts
│      │  │  │      └─2052
│      │  │  ├─WinForm
│      │  │  │  ├─scripts
│      │  │  │  │  └─2052
│      │  │  │  └─templates
│      │  │  │      └─2052
│      │  │  └─WinService
│      │  │      ├─scripts
│      │  │      │  └─2052
│      │  │      └─templates
│      │  │          └─2052
│      │  ├─ATL
│      │  │  └─ATLProject
│      │  │      ├─html
│      │  │      │  └─2052
│      │  │      ├─Images
│      │  │      ├─scripts
│      │  │      │  └─2052
│      │  │      └─templates
│      │  │          └─2052
│      │  ├─Generic
│      │  │  ├─Application
│      │  │  │  ├─html
│      │  │  │  │  └─2052
│      │  │  │  ├─images
│      │  │  │  ├─scripts
│      │  │  │  │  └─2052
│      │  │  │  └─templates
│      │  │  │      └─2052
│      │  │  ├─CustomWizard
│      │  │  │  ├─HTML
│      │  │  │  │  └─2052
│      │  │  │  ├─Images
│      │  │  │  ├─Scripts
│      │  │  │  │  └─2052
│      │  │  │  └─Templates
│      │  │  │      └─2052
│      │  │  └─MakefileProject
│      │  │      ├─HTML
│      │  │      │  └─2052
│      │  │      ├─Images
│      │  │      ├─Scripts
│      │  │      │  └─2052
│      │  │      └─Templates
│      │  │          └─2052
│      │  └─MFC
│      │      ├─Application
│      │      │  ├─html
│      │      │  │  └─2052
│      │      │  ├─images
│      │      │  ├─scripts
│      │      │  │  └─2052
│      │      │  └─templates
│      │      │      ├─1028
│      │      │      ├─1031
│      │      │      ├─1033
│      │      │      ├─1036
│      │      │      ├─1040
│      │      │      ├─1041
│      │      │      ├─1042
│      │      │      ├─2052
│      │      │      └─3082
│      │      ├─Control
│      │      │  ├─html
│      │      │  │  └─2052
│      │      │  ├─images
│      │      │  ├─scripts
│      │      │  │  └─2052
│      │      │  └─templates
│      │      │      └─2052
│      │      └─Library
│      │          ├─html
│      │          │  └─2052
│      │          ├─Images
│      │          ├─scripts
│      │          │  └─2052
│      │          └─templates
│      │              └─2052
│      └─CodeWiz
│          ├─.NET
│          │  ├─Component
│          │  │  ├─scripts
│          │  │  │  └─2052
│          │  │  └─templates
│          │  │      └─2052
│          │  ├─Installer
│          │  │  ├─scripts
│          │  │  │  └─2052
│          │  │  └─templates
│          │  │      └─2052
│          │  ├─UserControl
│          │  │  ├─scripts
│          │  │  │  └─2052
│          │  │  └─templates
│          │  │      └─2052
│          │  ├─WinForm
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  └─XMLSchema
│          │      ├─Scripts
│          │      │  └─2052
│          │      └─Templates
│          │          └─2052
│          ├─ATL
│          │  ├─AddToMFC
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─ASP
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─Consumer
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─Control
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─DLG
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─Event
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─ImplementInterface
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─Instance
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─Method
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  └─Scripts
│          │  │      └─2052
│          │  ├─MTS
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─PPG
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─Property
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  └─Scripts
│          │  │      └─2052
│          │  ├─Provider
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─Simple
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  └─SRFFile
│          │      ├─Scripts
│          │      │  └─2052
│          │      └─Templates
│          │          └─2052
│          ├─Generic
│          │  ├─Class
│          │  │  ├─HTML
│          │  │  │  └─2052
│          │  │  ├─Images
│          │  │  └─Scripts
│          │  │      └─2052
│          │  ├─DEFFile
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─PropertySheet
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  ├─RCFile
│          │  │  ├─Scripts
│          │  │  │  └─2052
│          │  │  └─Templates
│          │  │      └─2052
│          │  └─ResourceScript
│          │      ├─scripts
│          │      │  └─2052
│          │      └─Templates
│          │          └─2052
│          └─MFC
│              ├─AxControl
│              │  ├─HTML
│              │  │  └─2052
│              │  ├─Images
│              │  ├─Scripts
│              │  │  └─2052
│              │  └─Templates
│              │      └─2052
│              ├─CommandHandler
│              │  ├─HTML
│              │  │  └─2052
│              │  ├─Images
│              │  └─Scripts
│              │      └─2052
│              ├─Consumer
│              │  ├─HTML
│              │  │  └─2052
│              │  ├─Images
│              │  ├─Scripts
│              │  │  └─2052
│              │  └─Templates
│              │      └─2052
│              ├─Event
│              │  ├─HTML
│              │  │  └─2052
│              │  ├─Images
│              │  └─Scripts
│              │      └─2052
│              ├─Function
│              │  ├─HTML
│              │  │  └─2052
│              │  ├─Images
│              │  └─Scripts
│              │      └─2052
│              ├─Simple
│              │  ├─HTML
│              │  │  └─2052
│              │  ├─Images
│              │  ├─scripts
│              │  │  └─2052
│              │  └─Templates
│              │      └─2052
│              ├─Typelib
│              │  ├─HTML
│              │  │  └─2052
│              │  ├─Images
│              │  ├─Scripts
│              │  │  └─2052
│              │  └─Templates
│              │      └─2052
│              └─Variable
│                  ├─HTML
│                  │  └─2052
│                  ├─Images
│                  ├─Scripts
│                  │  └─2052
│                  └─Templates
│                      └─2052
└─Xml├─2052│  └─Snippets│      ├─xsd│      │  ├─Attributes│      │  ├─ComplexTypes│      │  ├─Elements│      │  ├─Extensions│      │  ├─Misc│      │  └─SimpleTypes│      └─xslt│          ├─html│          └─xslTags└─Schemas└─2052└─MSBuild

经过以上调整后,再安装VC2008,编译Hello world成功。后来又建立了一个基于对话框的MFC程序,又出了问题。。。。。。

总之一句话,只要好好设置各个include, lib等目录,相信一定可以解决问题的!我就是那样解决的!

error PRJ0003 : 生成“cl.exe”时出错 解决方案相关推荐

  1. VS2008如何解决 error PRJ0003 : 生成“cmd.exe”时出错。

    今天用vs2008编译时代码时出现了error PRJ0003 : 生成"cmd.exe"时出错这样的错误,如下图所示: 经查阅资料,问题很可能是:VC++ 目录中指定的可执行路径 ...

  2. VS2008编译错误:error PRJ0003 生成 cmd.exe 时出错

    在用VS2008编译C++程序的时候发现以下错误: error PRJ0003  生成 cmd.exe 时出错 其实意思就是找不到cmd.exe,我觉得,其原因是VS2008里的有些环境变量设置不对或 ...

  3. VS2005错误 error PRJ0003 生成 cmd.exe 时出错

    该问题由于VS2005的环境变量设置不对导致,解决如下: tools=> Options => Projects and Solutions -> VC++ Directories ...

  4. visual studio 2008运行时 error PRJ0003 : 生成“rc.exe”出错

    问题描述:visual studio 2008运行时 error PRJ0003 : 生成"rc.exe"出错        解决方法步骤如下 :1.运行vs2008安装程序,点击 ...

  5. c语言中执行cl exe时出错,执行cl.exe时出错怎么办

    执行cl.exe时出错的解决办法:首先打开vc界面:然后依次点击["TOOLS"-"Option"-"Directories"]:最后重新设 ...

  6. SQL Server 安装程序遇到以下错误: 无法生成临时类(result=1)。 error CS1567: 生成 Win32 资源时出错: 另一个程序正在使用此文件,进程无法访问。...

    SQL Server 安装程序遇到以下错误: 无法生成临时类(result=1). error CS1567: 生成 Win32 资源时出错: 另一个程序正在使用此文件,进程无法访问. 如果你装了千牛 ...

  7. c语言产生cl.exe错误,vc++6.0执行cl.exe时出错

    #include #include #define BUFFERSIZE 1024  /*允许处理的最长行有1024个字符*/ int main() { int a,b,sum;         /* ...

  8. c语言中执行cl exe时出错,VC6.0执行cl.exe时出错

    2016-07-17 回答 2010-10-09 18:29解决vc++6.0卸载后不能安装问题 电脑上的vc++6.0,无法调试程序,卸载后总是安装不成功.这是由于注册表没有清理完全的缘故.附上解决 ...

  9. VC6.0执行 link.exe 时出错

    执行 link.exe 时出错 编译程序中,没有问题,但是组建的过程中,一直报错,原以为是自己代码的问题.最后索性就只打印"hello world",还是报错,这就排除了代码的错误 ...

最新文章

  1. Nacos发布 v0.2 版本,无缝支持 Spring Cloud 微服务生态及高可用集群模式
  2. 标准化Keras:TensorFlow 2.0中的高级API指南
  3. 《Cloud Native Infrastructure》CHAPTER 7 (1)
  4. mysql5.5.30源码安装及主从搭建
  5. Ubuntu-C++环境设置
  6. PHP Class中public,private,protected,static的区别
  7. 刷爆AI圈!基于Transformer的DALL-E代码刚刚开源了
  8. OpenResty的现状、趋势、使用及学习方法
  9. cuid卡写入后锁死_CUID卡,CUID白卡,CUID门禁卡,CUID电梯卡,CUID可改写卡
  10. TrustBase团队完成subscript语言的Web3基金会Grant资助计划项目交付
  11. mc有什么红石机器人_我的世界:mc玩家与非mc玩家眼中的世界,测一测你mc中毒有多深...
  12. Vue中Three.js的天空盒
  13. Alink、Tensorflow on Flink 在京东的应用
  14. java .net 图形界面_Aspose.Words for .NET是一个无图形用户界面的.NET和JAVA Word文档的报告控件...
  15. ubuntu安装ROBOWARE
  16. 在css表格怎么居中对齐,css居中和对齐方法集锦
  17. kvaser 驱动修复(linux)
  18. Vtokendapp公链诠释
  19. B站压片 码率标准 和 码率变化 记录
  20. 数字认证机构(CA)业务流程

热门文章

  1. 每个人都应该使用的Python 3中被忽略的3个功能
  2. 成为一名真正的数据科学家有多困难
  3. mongdb 群集_群集文档的文本摘要
  4. 谷歌 colab_如何在Google Colab上使用熊猫分析
  5. 用户体验数据分析 书单_如何使用数据改善用户体验设计
  6. 如何使用Google Analytics(分析)设置和跟踪YouTube频道的效果
  7. react钩子_迷上了钩子:如何使用React的useReducer()
  8. 分表后需要注意的二三事
  9. stark组件开发之组合搜索基本显示
  10. 《疯狂前端开发讲义jQuery+Angular+Bootstrap前端开发实践》学习笔记