I know that there are other errors for certain header files with the same message of "No such file or directory", but my circumstances are a bit different as I will explain now.
我知道在某些头文件中还有其他一些错误,它们的消息是“没有这样的文件或目录”,但是我的情况有些不同,因为我现在要解释一下。
I use the Code Blocks IDE and wanted to start using the UI Automation library. When I tried to include the header
我使用代码块IDE并希望开始使用UI自动化库。当我试图包含标题时。
#include UIAutomation.h
Code Blocks could not find the header. From there I looked around my computer and saw that the UIAutomation.h, UIAutomationCore.h... and the other UIAutomation headers were in an "Include" file in the "Microsoft SDKs" folder.... So I went to (Settings -> Compiler -> Search directories) and in there I added a new directory to the include folder where the UI Automation headers were:
代码块无法找到标题。从那里,我环顾我的电脑,看到了UIAutomation。h,UIAutomationCore.h……和其他UIAutomation头”包括“文件在“微软sdk”文件夹中....于是我去了(设置—>编译器—>搜索目录),在那里我给包含文件夹添加了一个新目录,其中包含了UI自动化标题:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include;
C:\Program Files\Microsoft sdk \ Windows \ v7.0A \包括;
and Code Blocks found the headers. However... another error appeared:
代码块找到了标题。然而……另一个错误出现:
fatal error: sal.h: No such file or directory
and I searched for the sal.h in the "\Include" folder I had just written code for and there was no sal.h file. I understood everything up until here... I had to check if I had a sal.h folder somewhere else on my computer and I did, in a file somewhere in my Visual Studio 10 IDE folders (just to let u guys know, I use code blocks cause I have been using it for a long time, and only downloaded VS10 recently to use spy++). So then I thought ok... I'll do the same thing I did before again so that I can include those files too, so I go back into the Search directories section and add the directory:
我寻找sal。在“\Include”文件夹中,我刚刚编写了代码,没有sal。h文件。在这里之前我什么都懂……我得检查一下是否有萨尔。h文件夹在我电脑上的其他地方,我在我的Visual Studio 10 IDE文件夹的某个文件中做过(只是为了让你们知道,我使用代码块是因为我已经使用它很长时间了,而且最近才下载了VS10来使用spy++)。于是我想,好吧……我还会做以前做过的事情,这样我也可以包含这些文件,所以我回到搜索目录部分,添加目录:
C:\Program Files\Microsoft Visual Studio 10.0\VC\include
C:\Program Files\Microsoft Visual Studio 10.0 \ VC \包括
but from there a million different errors appeared, all refereeing to different issues. Can anyone tell me what I did wrong? All I wanted to do was use the UI Automation headers so that I can start coding with the library, but that is proving to be a bit difficult...
但从那以后出现了上百万个不同的错误,所有的错误都指向不同的问题。有人能告诉我我做错了什么吗?我想要做的就是使用UI自动化头文件,这样我就可以开始使用库进行编码了,但事实证明这有点困难……
1 个解决方案
#1
1
From what one can get from this related Q&A: 'How do I get sal.h' it's not possible to use this stuff with a different toolchain than MSVC (Visual Studio).
从这个相关的问答中我们可以得到什么:“我如何得到萨尔?”与MSVC (Visual Studio)不同的工具链使用这些东西是不可能的。
You may consider to configure MSVC as toolchain for this codeblocks project.
您可以考虑将MSVC配置为这个codeblocks项目的工具链。
#1
1
From what one can get from this related Q&A: 'How do I get sal.h' it's not possible to use this stuff with a different toolchain than MSVC (Visual Studio).
从这个相关的问答中我们可以得到什么:“我如何得到萨尔?”与MSVC (Visual Studio)不同的工具链使用这些东西是不可能的。
You may consider to configure MSVC as toolchain for this codeblocks project.
您可以考虑将MSVC配置为这个codeblocks项目的工具链。