Nearly everything I use related to the windows.h file doesn't work. I have included the file, yet nothing is working.
The errors that it is giving me are:
C3861: '~~': identifier not found
I have included the windows header file and scanned around on Google for awhile without finding a fix.
Did you #include <Windows.h>? If the compiler is telling you that PeekMessage is undefined, you're probably missing a header file.
Related
I encountered a preprocessor or lexical error when I tried to build my project to an archive. This did not happen on the release nor debug configuration settings on the simulator.
The message is:
lexical and preprocessor issue: 'tidy.h' file not found
The 'tidy.h' is included by CTidy.h, which is part of TouchXML library.
I found 'tidy.h' in a subfolder of 'iPhoneSimulator5.1.sdk'. To my surprise, the file is absent in 'iPhoneOS5.1.sdk'
Is it OK for me to just copy the file to the iPhoneOS5.1.sdk?
Thanks
Try commenting out the:
#include "tidy.h"
... in CTidy.h, or alternatively comment out:
#include "CTidy.h"
That is, check to see whether the header file is really necessary.
If you find that it's not, either submit a patch to the TouchXML developers, or file a bug with them, or send them an email.
It is quite common for headers to be included unnecessarily. For example I could write some code that depends on "foo.h", then delete my code, or refactor it in such a way that it doesn't need the header anymore, yet forget to delete the header inclusion as well.
So I'm trying to compile a DX9 program that include the headers d3d9.h and d3dx9.h. However it keeps getting a fatal error trying to find d3dx9.lib. What's interesting is that when I try to input d3dx9.h it shows up as in "Microsoft SDKs\Windows..." and in "Microsoft DirectX SDK...". I have set up the include and library directories under VC++ Directories for the project. I get no errors in the code, but only when compiling. DirectX (June 2010) did install correctly, so I'm not sure what could be causing this, any help?
There is no d3d9x.lib, you probably transposed the letters. It is d3dx9.lib. Check your linker settings for the name, maybe a #pragma comment in your code.
If you are sure you got it right then use the Linker, Input, Ignore Specific Library setting.
I am developing a project for Minix in C Language and I have a folder to put the drivers of the devices called core. In the main.c I did an include of the vbe.h that is inside this folder and the make give me allways an error of bad syntax.
I tried two ways:
#include "./core/vbe.h"
#include "core/vbe.h"
I have always an error!
Can anyone help me?
Just so that the internet knows, I got this error and solved it. I believe I understand the reason as well.
I had used an array within a file which was not initialized. When I noticed this and commented the array out, it compiled fine.
My reasoning for the wording of the error is that it assumed I wanted to include this array, and that I forgot to include another file. So annoying.
The MSDN documentation for CommitTransactionAsync indicates it may produce an ERROR_PENDING error code. However, this error code does not seem to be defined in winerror.h, nor any other header reachable from ktmw32.h or windows.h (using the version of the Windows SDK included in Visual Studio 2010). In fact, I cannot find a single file containing the text ERROR_PENDING anywhere in the Windows SDK 7.1; manually going through the list of System Error Codes doesn't reveal it either. Where can I find the definition of this elusive error code?
Experimentation shows CommitTransactionAsync to produce ERROR_SUCCESS - is this a simple matter of the documentation being wrong?
It's a doc bug. #flashk's guess is correct: it can produce ERROR_IO_PENDING. I am submitting a bug to the doc owner today. Thanks!
Is there a "call stack" for compiler errors in Visual Studio 2005 (C++)?
For example, I am using a boost::scoped_ptr as the value in a QHash. This is however causing the following compile error:
1>c:\qt\include\qtcore\../../src/corelib/tools/qhash.h(743) : error C2248: 'boost::scoped_ptr<T>::operator =' : cannot access private member declared in class 'boost::scoped_ptr<T>'
From the build output I know which of my source files is causing the error and the line number in the qhash.h that is causing the error but I am trying to track down the line number in my source file that is generating the error (hence the "call stack" idea).
Please note, I am not looking for the solution to the problem of using a scoped_ptr in a QHash but the problem of tracking down where compile errors are generated. This would also be useful for helping track down weird warnings. More often than not I run into this problem when using templated classes.
Thanks!
Sometimes with strange errors it helps to preprocess the file and look at that output. With VS look for "Generate Preprocessed File" under preprocessor settings (or set the /P switch). This will generate XXX.i from XXX.cpp which may help you figure out the problem.
Make sure you turn off the switch after, with this option turned on it won't generate an obj file.
If you look at the build output, you should see which project and which .cpp file was being compiled when this error occurred.
There is really no notion of "call stack" here, because the compiler processes one source file at a time. You have a compiler error in the header file, so you need to find out which source file including that header was being compiled.
These types of errors can be hard to track down. Usually I end up comment out code and finding the offending line and working from there. After doing it a while you will learn to better read the error messages and understand what tripped up the compiler. As it stands the compilers error messages are just horrible.
In this case it is saying that you have an object of type boost::scoped_ptr<T> that it is trying to copy but the class won't let you (operator= and the copy ctor are both hidden). So you need to look at how the class is used and see why it is trying to copy it. Maybe a scoped_ptr isn't what you need. Maybe you need a shared_ptr?