为什么我的C code是编译到一个EXE [英] Why Isn't My C Code Being Compiled To An EXE

查看:192
本文介绍了为什么我的C code是编译到一个EXE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始写出来试图用C来写一个简单的程序,我使用视觉工作室这样做。我听说,它并编译C和C ++。我知道,它确实是因为它说,它编译。唯一的问题是,当我去到输出目录,没有在目录中的.exe文件!它具有如下:


  • BuildLog.html

  • mt.dep

  • test1.obj

  • vc90.idb

  • vc90.pdb

但是,这一切!没有EXE。我已经通过所有选项看上去并确保它被设置为编译一个exe和我检查了输出文件。这是$(OUTDIR)\\ $(项目名).exe文件。但很可惜,没有出现exe文件。任何想法?

此外,当我尝试按F5和运行登场,我得到一个错误,指出


  

此应用程序未能启动
  因为MSVCR90.DLL没有找到。
  重新安装这个程序可能修复
  这个问题



解决方案

这是当你创建一个新的解决方案中的一个新的C ++项目,你得到的文件夹结构这样的默认值:

C:\\项目\\ YourSolution
C:\\项目\\ YourSolution \\ YourCppProject

YourSolution包含YourSolution.sln和YourCppProject包含YourCppProject.vcproj。

在构建解决方案,从YourCppProject所有中间文件获得存储在YourCppProject \\ Debug或YourCppProject \\发布,但造成YourCppProject.exe下YourSolution \\ Debug或YourSolution \\释放去。

您$(OUTDIR)由通用配置 - >输出目录。检查项目配置YourCppProject并看到它使用$(SolutionDir)为输出。

I'm just starting out writing trying to write a simple program in C and I am using Visual Studios to do so. I heard that it does compile C as well as C++. And I know that it does because it says it compiles. The only problem is that when I go to the output directory, there isn't a .exe file in the directory! It has the following:

  • BuildLog.html
  • mt.dep
  • test1.obj
  • vc90.idb
  • vc90.pdb

But that is all! No EXE. I've looked through all the options and made sure that it is set to compile to an exe and i checked the output file. That is $(OutDir)\$(ProjectName).exe. But alas, no exe appears. Any ideas?

Also when i try to hit f5 and run with debut i get an error that says

This application has failed to start because MSVCR90.DLL was not found. Re-installing the application may fix this problem

解决方案

By default when you're creating a new C++ project within a new solution, you're getting folder structure like this:

C:\Projects\YourSolution C:\Projects\YourSolution\YourCppProject

YourSolution contains YourSolution.sln and YourCppProject contains YourCppProject.vcproj.

When you build the solution, all intermediate files from YourCppProject are getting stored under YourCppProject\Debug or YourCppProject\Release, but resulting YourCppProject.exe goes under YourSolution\Debug or YourSolution\Release.

Your $(OutDir) is configured by General -> Output Directory. Check project configuration for YourCppProject and see that it uses $(SolutionDir) for the output.

这篇关于为什么我的C code是编译到一个EXE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆