|
Okay so my laptop has about 2.5 years of accumulated debris on it: VS2008, VS2015, VS Code (gone now). I have a project that contains multiple activeX controls for Windows Embedded Compact 7. I need to modify these for an update I need to get out. Go to control A - view resources - it expands to show me: Bitmap, Dialog, Icon, ... etc. Go to control B - view resources - burps with the error:
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\atlmfc\incdue\winres.h(33)
fatal error RC1015: cannot open include file 'winresrc.h"
Now here's the weird part - they compile fine. So VS2008 can find it when it wants too.
If I compare the two project files, I can see no differences (other than the filenames). I do have the files it is looking for, so it isn't that. In a fit of inspiration, I fired up a Windows 10 VM I have that is "newer" than the base iron. VS2008 running from there opens the resource views fine - same project files accessed over a shared folder.
I'm at a complete loss. Any ideas? Most of my google fu points me to defunct microsoft forums, but most of the hits have to do with compile time issues.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Take a look at Project Properties -> General -> Windows SDK Version. It may be that your project needs to be re-targeted to a specific version as shown in the drop down in the right pane (yes Microsoft, a right pain).
|
|
|
|
|
Either I'm blind or it's not there. Perhaps because the project targets a smart device?
Hmm, created a dummy mfc desktop app, I don't see it there either...
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Yes, it was a shot in the dark but has worked for me.
|
|
|
|
|
Likely you have you include directories fixed to a specific directory
Property Pages -> VC++ Directories -> Include Directories
Set it back to Inherit from parent or project defaults
In vino veritas
|
|
|
|
|
I checked this, I'll dig a little more. I'm not sure why I would need to change that when the project compiles fine. Wondering if there isn't some registry setting somewhere (grasping in the dark).
This is just getting weirder. Now my VM cannot expand the project resource tree.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Delete all the project files and do a create project from existing source .. usually faster once the problem goes to far.
In vino veritas
|
|
|
|
|
charlieg wrote: "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\atlmfc\incdue\winres.h(33) Are you absolutely sure that you have a folder named incdue?
Ouyay ouldshay ytray angingchay atthay otay includeway
Best Wishes,
-David Delaune, Oink
|
|
|
|
|
propeller head you are I could not cut and paste it, just a typo on my part.
Tomorrow it's supposed to rain here, I'll keep digging.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
charlieg wrote: I could not cut and paste it, just a typo on my part.
Do you mean the Ctrl+C / Ctrl+V doesn't work in your environment? 
|
|
|
|
|
Many of the error dialogs that Microsoft will post do not allow you to cut/paste the text...
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
So true, so annoying, and quite how they do it is a mystery.
|
|
|
|
|
I'll just throw this out there from my own experience.
You might try creating a 'test' user profile to see if it fixes it.
I had a problem with VS2005 a couple of years ago that I could not figure out.
I looked and looked and even tried reinstalling VS and couldn't fix it.
I have two user profiles on my system and just by chance I logged onto my admin
profile and opened VS and the problem was not there.
So I created a new user profile that corrected the problem.
Have no idea why.
|
|
|
|
|
A good idea, sadly it did not work...
i'll keep digging.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
winresrc.h??
Quote: The final clue came when I looked at the file trying to include winresrc.h and saw that the include was enclosed in ...
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
|
|
|
|
|
I'll double check that - found that post, but did not apply - could be my error.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
winresrc.h is in the Platform SDK folder on my system. Is this path included in
your projects Include Directories list or has it maybe been moved
into the incorrect order in the list?
-- modified 25-Aug-19 17:56pm.
|
|
|
|
|
Project has not been modified, and I don't move stuff. It hurts
Here's the riddle - all I've checked in VS2008 indicates what it will use when I want to build. I support a number of platforms, so I have half dozen winresrc.h on my machine. I can build the project, but I cannot edit the resources. nothing I have read tells me what vs2008 is looking for - this smells like a bug.
For the moment, I have the project updated and rebuilt using the VM, etc, but it's still something I want to fix.
Truly appreciate all of the suggestions
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Lastly, you probably have done this already but a search on "winresrc.h resource RC1015" brings
up a number of questions and responses concerning this error.
Good luck 
|
|
|
|
|
I am struggling from some time to an error:
error C2059: syntax error : ')'
I have somewhere in the old code:
#define list_entry(ptr, type, member) \
((type *)((char *)(ptr)-(size_t)(&((type *)0)->member)))
I have tried this solution, without success: c - list_entry in Linux - Stack Overflow[^]
How can I get rid of this error ?
I am trying to integrate this code in an MFC project, and the code from above is from C code (for linux I guess)
|
|
|
|
|
Please show us the actual line of code where the error occurs.
|
|
|
|
|
const int nTest = list_next_entry(0, 0);
where list_next_entry is
#define list_next_entry(pos, member) list_entry(0, 0, 0)
and list_entry is defined in the first post.
P.S. Of course, 0 values are for testing purpose only.
|
|
|
|
|
A good alternative is to not use #define directives in this way, as they only serve to confuse.
modified 20-Aug-19 12:37pm.
|
|
|
|
|
This is legacy code, is not written by me.
|
|
|
|
|
Then I would suggest you search out every usage of those defines and turn them into real code.
|
|
|
|