

- #Visual studio 2008 install moq how to#
- #Visual studio 2008 install moq full#
- #Visual studio 2008 install moq code#
- #Visual studio 2008 install moq plus#
- #Visual studio 2008 install moq series#

#Visual studio 2008 install moq how to#
How to use Fluent NHibernate with auto mappings.If you haven’t already, you might want to catch up: This time, I will cover unit testing with NUnit and Moq.
#Visual studio 2008 install moq series#
This is the fourth article in a series on using Fluent NHibernate with auto mappings. FNHAMASPDNMVC3CWNUM is the official acronym of this post. I’m going for a record: internet’s longest blog post title. That solves that mystery.īut how do we fix our program? I’ll tell you how to change your project’s configuration to get up and running quickly, but I’ll also tell you how to take advantage of precompiled headers if you want to do things the Visual C++ way.įirst, if you want Visual C++ to behave like Code::Blocks, right click on your project in the Solution Explorer pane and go to Properties: In fact, Code::Blocks normally comes with a version of GNU specifically for Windows called MinGW (Minimalist GNU for Windows).
#Visual studio 2008 install moq code#
That tutorial we got our code from probably assumed we weren’t using Microsoft tools but standard tools like GNU Make. This is because new projects in Visual C++ are configured to use precompiled headers, but not in Code::Blocks. Want to know something freaky? Our program compiles without a hitch in Code::Blocks. i.e., we didn’t #include "stdafx.h" at the beginning of our file. It doesn’t know either way because we never told it to look there. Unless you’ve been reading ahead, it won’t find it there either. It never found it, but it thinks it could be in stdafx.h. Here, the compiler is telling us it kept looking for our precompiled header ’til it hit the end of the file. Did you forget to add '#include "StdAfx.h"' to your source? Unexpected end of file while looking for precompiled header. The second error message comes from line 10, error code C1010: Visual C++ reports not one but two problems with our code. At least 50% of my time at work is spent debugging errors.) (By the way, are we having fun yet? Get used to debugging errors if you want to become a programmer. We could add another directive like this to stdafx.h, another header file which is included in our project under “Header Files” in the Solution Explorer pane. In our program, #include instructs the compiler to look in the iostream header file for things like cout. (i.e., iostream will probably never be updated.)Īdd directive to 'StdAfx.h' or rebuild precompiled headerĪ “directive” is an instruction we can give to the compiler. We don’t need to compile it again because it is not going to change.
#Visual studio 2008 install moq plus#
What’s a “precompiled header?” It’s just another C++ file that has some code that we need in it, plus it’s already been compiled. '#include ' skipped when looking for precompiled header useīasically, the compiler didn’t bother to include the file we asked it to (it skipped it). So let’s break this error message down, starting with: There’s a lot of vocabulary here for a beginner to learn. We don’t normally expect anyone to read, much less understand, something in another language.

Visual C++ is pretty clear about what the problem is, but if you’re completely new to programming or to C++ then these words probably don’t mean much to you.īeginners often get flak in programming circles for not reading or understanding error messages – in this case, a search for warning c4627 would get you pretty far – but I think this is a bit unfair. This is followed by the warning code, which is C4627, and the rest of the warning message. We know this because the line number is shown in parentheses after the filename in the Output pane. Right away, there’s a problem with line 1. = Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped = Here is the rest of the message:ġ>- Build started: Project: ConsoleApplication1, Configuration: Debug Win32 -ġ>e:\code\visual c++ projects\consoleapplication1\consoleapplication1\consoleapplication1.cpp(1): warning C4627: '#include ': skipped when looking for precompiled header useġ> Add directive to 'StdAfx.h' or rebuild precompiled headerġ>e:\code\visual c++ projects\consoleapplication1\consoleapplication1\consoleapplication1.cpp(10): fatal error C1010: unexpected end of file while looking for precompiled header.
#Visual studio 2008 install moq full#
You can see the full error message in the Output pane, which is normally docked at the bottom of the window. Visual C++ displays the full error message in the Output pane (bottom)
