Home > Error Cannot > Error Cannot Open Source File Stdafx.h

Error Cannot Open Source File Stdafx.h

You can put anything before, no syntax error. –Benoit Jun 1 '11 at 15:06 1 @Benoit: My Visual Studio (2010) reports something (at least a warning) when stdafx.h is not That should be also an issue. c++ visual-c++ share|improve this question edited Jun 1 '11 at 21:12 Alexey Kukanov 8,2212048 asked Jun 1 '11 at 14:58 Jake 1,13732345 add a comment| 2 Answers 2 active oldest votes Optional Password I have read and agree to the Terms of Service and Privacy Policy Please subscribe me to the CodeProject newsletters Submit your solution! http://outwardsound.com/error-cannot/error-cannot-open-source-file-mpi-h.html

I was puzzled for quite some time, when I encountered this error for I found no reasonable explanation! Join them; it only takes a minute: Sign up cannot open source file “stdafx.h” up vote 6 down vote favorite I have two include file headers #include "stdafx.h" #include "psapi.h" However Or remove and readd it to the project. –ceztko Oct 13 '14 at 15:08 1 @ceztko "it's inadvisable to include the precompiled header in your own headers, to not clutter You only need stdafx.h if you make a project that has some prebuilt settings.

I think i dont have the image file here is my code #include "stdafx.h" #include #include #include int _tmain(int argc, _TCHAR* argv[]) { IplImage *img = cvLoadImage("Image.bmp"); cvNamedWindow("Image:", Build me a brick wall! How can I track time from the command-line? Does my electronic parking brake remain engaged if I disconnect the battery?

The cost of switching to electric cars? more hot questions question feed lang-cpp about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Is it an anti-pattern if a class property creates and returns a new instance of a class? If the book didn't guide you that way then you ought to look for another one.

When answering a question please: Read the question carefully. Why is looping over find's output bad practice? Why is the dialogue 'You talking to me' from the movie 'Taxi Driver' so famous? You seem to have missed out the int main() function It is std::endl not std::end1 So something like this: #include int main() { std::cout <<"Hello World!" <

Product of all divisors=cube of number. Why is Professor Lewin correct regarding dimensional analysis, and I'm not? Your Email This email is in use. If you are not experienced with Visual Studio, I would recommend to keep the stdafx.h in the project.

It is not necessary, but disabling the compiler feature can be a little tricky if you have never done it before. I just started my first real job, and have been asked to organize the office party. Why is innovation spelt with 2 n's while renovation is spelt with 1? How much does a CLW potion heal?

Please let me know if there is a setting to fix this properly, although even if there is there is still a bug but it would then be in the project http://outwardsound.com/error-cannot/error-cannot-open-read-repomd-xml-file-for-repository-extras-source.html Count trailing truths Reverse a hexadecimal number in bash Are there continuous functions for which the epsilon-delta property doesn't hold? It will solve your issue. The preprocessor will IGNORE every leading line before encountering #include "stdafx.h".

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Proposed as answer by Martha Wieczorek MSFT Thursday, September 02, 2010 11:26 PM Tuesday, June 08, 2010 10:12 PM 0 Sign in to vote Just had the same problem...I closed the I was puzzled for quite some time, when I encountered this error for I found no reasonable explanation! navigate here On opening some of my source files in the code editor I noticed a large number of Intellisense red error "squiggles" the first of which is "Error Cannot open source file

Errors when running CUDA with OpenCv Include File is present but again showing fatal error C1083: Cannot open include file error when try to include atlrx.h error LNK1104: cannot open file Can I cite email communication in my thesis/paper? How can I ask about the "winner" of an ongoing match?

Resolving the problem If a precompiled header is not used, this include shouldn't get generated in the code.

If you don't (e.g. Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI How much does a CLW potion heal? I know since I got it working, It shouldn't matter, but its bugging me and I have a feeling it might trip me up later if I don't know.

Why there are no approximation algorithms for SAT and other decision problems? Is it an anti-pattern if a class property creates and returns a new instance of a class? Every precompiled header has #pragma once, so only the first one is used and the other (like in vector.h) are ignored, aren't they? –peci1 Jun 10 at 0:48 1 Hmm, his comment is here How much time would it take for a planet scale Miller-Urey experiment to generate intelligent life more hot questions question feed lang-cpp about us tour help blog chat data legal privacy

Watson Product Search Search None of the above, continue with my search How to avoid the error message : "Cannot open include file: 'stdafx.h': No such file or directory"? Do we have "cancellation law" for products of varieties How can I track time from the command-line? Do we have "cancellation law" for products of varieties How can Indiana already be won even though only 8% of polls have reported? Is it ethical for a journal to cancel an accepted review request when they have obtained sufficient number of reviews to make a decision?

Not the answer you're looking for? Join them; it only takes a minute: Sign up ERROR: Cannot open source file “ ” up vote 10 down vote favorite 1 I am running visual studio C++ and I Topic archived. Browse other questions tagged c++ c or ask your own question.