What did I lose when I upgraded to Win7?
November 30, 2009 7:32 AM Subscribe
[Various Filters] I am stuck.
I am using MS Visual Studio 2008 to create a software package. I saved all the source code and what (I thought) I needed so I could format the machine and install the Win7 Update as a fresh OS. After reinstalling the VS2008 compilers, now the project will not compile.
The project is a VB.NET front-end GUI and a VC++ DLL back-end which talks to a PIC24FJ256GB110 micro over USB.
The compiler starts spewing error messages as the except.h header file is drawn in. (This file is created by Microsoft and included by some other file, I do not know what file actually includes it.)
The first specific error is: "C2065 '_In_': undeclared identifier."
I suspect that the problem is some kind of compiler setting or directive that is not carried over in the project file. I tried creating a new project from scratch and working the source files into the new project, but the error persists.
I have posted questions on the MS news servers and on stackoverflow.com and have not received helpful answers.
The project is a VB.NET front-end GUI and a VC++ DLL back-end which talks to a PIC24FJ256GB110 micro over USB.
The compiler starts spewing error messages as the except.h header file is drawn in. (This file is created by Microsoft and included by some other file, I do not know what file actually includes it.)
The first specific error is: "C2065 '_In_': undeclared identifier."
I suspect that the problem is some kind of compiler setting or directive that is not carried over in the project file. I tried creating a new project from scratch and working the source files into the new project, but the error persists.
I have posted questions on the MS news servers and on stackoverflow.com and have not received helpful answers.
Response by poster: Ah, the DLL that I am referencing is of my own creation.
The errors are generated when VS2008 tries to compile the DLL.
posted by Drasher at 8:05 AM on November 30, 2009
The errors are generated when VS2008 tries to compile the DLL.
posted by Drasher at 8:05 AM on November 30, 2009
Best answer: from here:
The problem is a mixture of header file between DDK and VC 2008
My solution:
- In VS 2008 project,
- In the "C/C++ -> Preprocessor" - Set ignore default standard library to YES
- In the "General->Additional Include Directories" specified
the DDK path "C:\WinDDK\6000\inc\api; C:\WinDDK\6000\inc\crt"
- compile and it work - Hope this help
posted by sanko at 8:25 AM on November 30, 2009
The problem is a mixture of header file between DDK and VC 2008
My solution:
- In VS 2008 project,
- In the "C/C++ -> Preprocessor" - Set ignore default standard library to YES
- In the "General->Additional Include Directories" specified
the DDK path "C:\WinDDK\6000\inc\api; C:\WinDDK\6000\inc\crt"
- compile and it work - Hope this help
posted by sanko at 8:25 AM on November 30, 2009
Response by poster: mkultra: Yes to installing the WDK. (I need the USB includes & LIBs.)
sanko: DING! DING! DING! We have a WINNAR!
I kind of followed the directions...
All I had to do is add the C:\WinDDK\6000\inc\crt include directory.
I did not have to set the "Ignore default standard library", mostly because the Preprocessor page of the Configuration properties does not have such a page. (It does have an "Ignore Standard Include Path" selection though.)
[If you don't mind, please let me know how you found the solution, my email is in my profile, or use MeMail. Thanks.]
Thanks so much mkultra and sanko!! You saved my day; and then some... I have been puzzling over this for nearly a week.
posted by Drasher at 8:54 AM on November 30, 2009
sanko: DING! DING! DING! We have a WINNAR!
I kind of followed the directions...
All I had to do is add the C:\WinDDK\6000\inc\crt include directory.
I did not have to set the "Ignore default standard library", mostly because the Preprocessor page of the Configuration properties does not have such a page. (It does have an "Ignore Standard Include Path" selection though.)
[If you don't mind, please let me know how you found the solution, my email is in my profile, or use MeMail. Thanks.]
Thanks so much mkultra and sanko!! You saved my day; and then some... I have been puzzling over this for nearly a week.
posted by Drasher at 8:54 AM on November 30, 2009
I remember wrestling with glitches like that back in the day. That kind of thing (plus link errors) is why I'm glad to no longer be coding C/C++ :)
What I would do would be to search around and see if you can figure out what '_in_' is supposed to mean. My guess is that it's being used as a kind of comment on function parameters -- input or output. So if you have a function like:
void * MSFunction(_in_ int a, _out_ int b);
Or whatever.
Try figuring out what _in_ is supposed to be declared as and declare that yourself (although this will probably just cause more errors).
According to this q&a the file you're missing is called 'specstrings.h'
Also, try asking this on stackoverflow if you can't get it working.
posted by delmoi at 8:55 AM on November 30, 2009
What I would do would be to search around and see if you can figure out what '_in_' is supposed to mean. My guess is that it's being used as a kind of comment on function parameters -- input or output. So if you have a function like:
void * MSFunction(_in_ int a, _out_ int b);
Or whatever.
Try figuring out what _in_ is supposed to be declared as and declare that yourself (although this will probably just cause more errors).
According to this q&a the file you're missing is called 'specstrings.h'
Also, try asking this on stackoverflow if you can't get it working.
posted by delmoi at 8:55 AM on November 30, 2009
Response by poster: delmoi: Yeah, I did this "back in the day" too... I've been programming C/C++ since the mid-1980s :)
Trick was that "back in the day" you could see all the includes and there were only a couple of compiler specific ones... nowadays, these new-fangled compilers include all kinds of stuff... dealing with windows means using a bunch more stuff than those old console devices.
You are close for the _In_ "directive". It is more like a "this is the direction of the data" specifier. But the trick was not exactly what _In_ means, but what file defined it.
posted by Drasher at 9:38 AM on November 30, 2009
Trick was that "back in the day" you could see all the includes and there were only a couple of compiler specific ones... nowadays, these new-fangled compilers include all kinds of stuff... dealing with windows means using a bunch more stuff than those old console devices.
You are close for the _In_ "directive". It is more like a "this is the direction of the data" specifier. But the trick was not exactly what _In_ means, but what file defined it.
posted by Drasher at 9:38 AM on November 30, 2009
This thread is closed to new comments.
posted by mkultra at 7:40 AM on November 30, 2009