本人最近用VC观摩学习VTK(一个可视化工具包)的代码,对于这个工程文件夹,用Biuld按钮没有问题,但用Compiler按钮时,就出现Cannot compile the file 'C:\Documents and Settings\SQSavage\桌面\VTK-4.2-LatestRelease\VTK\IO\vtkDataReader.h'; no compile tool is associated with the file extension.只有一个确定按钮的提示框,这是回事呢?我也发了另外一个和这个问题相关的帖子,也与VTK相关,欢迎大家前去指点,100分不多,权当感谢!
http://community.csdn.net/Expert/topic/3418/3418398.xml?temp=.2269556

解决方案 »

  1.   

    Build是编译+链接
    生成obj和exeCompile是编译,生成obj
      

  2.   

    而且不能单独Compile头文件
      

  3.   

    对,不能编译头文件的。
    而且不能单独Compile头文件
    -----------------------------
    是指什么?指Build是不能单独编译头文件?Compiler能单独编译头文件?
      

  4.   

    Compiler的中文意思不就是“编译”吗?编译是一个文件一个文件的编译,生成obj文件。而.h头文件中没有函数,是不能被单独编译的。
    Link链接是将obj文件链接成exe文件。
    Build是Compiler编译+Link链接,生成exe文件。如果源文件都被Compiler编译过了,它就只执行Link链接。
      

  5.   

    Build是编译+链接生成obj和exe  Compile是编译,生成obj
    我学到新知识了:)
    Compile不重新生成exe????
      

  6.   

    Cannot compile the file 'C:\Documents and Settings\SQSavage\桌面\VTK-4.2-LatestRelease\VTK\IO\vtkDataReader.h'; no compile tool is associated with the file extension.Compile就是单独编译一个文件,在编译菜单中会看到文件名,.h不能够单独被编译,但使用#include包括在.cpp或.c文件中就可以被编译了。
      

  7.   

    Cannot compile the file 'C:\Documents and Settings\SQSavage\桌面\VTK-4.2-LatestRelease\VTK\IO\vtkDataReader.h'; no compile tool is associated with the file extension.Compile就是单独编译一个文件,在编译菜单中会看到文件名,.h不能够单独被编译,但使用#include包括在.cpp或.c文件中就可以被编译了。
      

  8.   

    Compile只编译当前得cpp文件
    并生成objbuild是编译并生成exe文件