missing "afxres.h" while compiling

1,709 views
Skip to first unread message

Angel (Mif)

unread,
Dec 19, 2010, 10:58:34 AM12/19/10
to OpenNI
Hi there!
I'm trying to compile the sample codes but it seems like i'm missing
this file: "afxres.h" has anyone had this problem before?
Is this related to the fact that I'm using VS C++ Express edition?
Any solution?

Thanks!

Iker Saint

unread,
Dec 19, 2010, 12:13:44 PM12/19/10
to OpenNI
There is a common error when you use MFC, please more details about
the error.

Iker

BillB

unread,
Dec 21, 2010, 8:31:36 AM12/21/10
to OpenNI
Hi,

I also has this problem with VS2010 C++ (interestingly enough I did
not have the problem with VS2008).

Anyway, the way I solved it was to go to the "OpenNI.rc" file, view
this code and change all occurrences of "afxres.h" to
"windows.h" (there were only 2 instances).

This seemed to solve the problem. Hope it also works for you.


jonas Biensack

unread,
Dec 21, 2010, 11:34:45 AM12/21/10
to OpenNI
@BiLLB this is the commend way to do it!

Look at the c++ help, to find the answer. windows.h should be used
instead of "afxres.h"!
This is the right way to do it!

keep up that good help :)

Eddie Cohen

unread,
Dec 21, 2010, 12:13:10 PM12/21/10
to openn...@googlegroups.com
The weird thing is that Visual Studio (even 2010) creates the file with #include "afxres.h" (just tried it).
Why would Visual Studio create the file in a way that would not compile?

Eddie.

--
You received this message because you are subscribed to the Google Groups "OpenNI" group.
To post to this group, send email to openn...@googlegroups.com.
To unsubscribe from this group, send email to openni-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.

Torsten

unread,
Dec 23, 2010, 5:58:30 AM12/23/10
to OpenNI
I had the same problem using Visual Studio 2008. Replacing afxres.h
with windows.h helped. The OpenNI samples compile now.

Thanks,

Torsten

Mike Slinn

unread,
Dec 24, 2010, 11:54:14 AM12/24/10
to OpenNI
When I change both occurrences of afxres.h to windows.h I get the
following error:

1>------ Build started: Project: NiAudioSample, Configuration: Debug
Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp
\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(E:
\Program Files (x86)\OpenNI\Samples\NiAudioSample\Debug
\NiAudioSample.exe) does not match the Linker's OutputFile property
value (E:\Program Files (x86)\OpenNI\Samples\Bin\Debug
\NiAudioSample.exe). This may cause your project to build incorrectly.
To correct this, please make sure that $(OutDir), $(TargetName) and $
(TargetExt) property values match the value specified in %
(Link.OutputFile).
1>
1>mt.exe : general error c101008a: Failed to save the updated manifest
to the file "Debug\NiAudioSample.exe.embed.manifest". The parameter is
incorrect.

Mike

Matt Bell

unread,
Jan 15, 2011, 6:59:25 PM1/15/11
to OpenNI, msl...@micronauticsresearch.com
Mike -- did you get this error resolved?

I fear it's probably something obvious as I'm used to developing on
MacOS. Visual Studio and the Windows programming environment are new
to me.


On Dec 24 2010, 8:54 am, Mike Slinn <msl...@micronauticsresearch.com>
wrote:

Matt Bell

unread,
Jan 15, 2011, 7:27:31 PM1/15/11
to OpenNI
Never mind... it looks like doing a make clean and rebuild fixes that
problem. Visual Studio really likes to hide the "make clean"
option. :-) I was wondering where it was for a while, and their built-
in help wasn't so good. Definitely a VS noob error.
Reply all
Reply to author
Forward
0 new messages