4

I am new to Unreal and I have this project in Unreal. I added a couple of new cpp files which includes some standard header files like string.h, stdlib etc. Intellisense does not give an error but project just won't compile. This is the error

Error 1 error : The first include statement in source file 'C:\<path>\Source\RoboRev_Win\Parser\Parser.cpp' is trying to include the file 'iostream' as the precompiled header, but that file could not be located in any of the module's include search paths. C:\<path>\Intermediate\ProjectFiles\EXEC RoboRev_Win

I even tried added paths to include directories under project properties but not use. Can somebody please help ?

Aadithya
  • 189
  • 1
  • 4
  • 18

2 Answers2

2

I just had this problem and fixed it by making sure that the common project header was the first include statement on all my files:

If your project name is Foo, make sure that you are not including anything above the line #include "Foo.h"

TheBat
  • 1,006
  • 7
  • 25
1

Make sure you include the standard header files before any "YourFile.generated.h" statement.

Also make sure you use the correct syntax, for example

#include <regex>

instead of

#include "regex"

If that does not help:

  • Maybe post the top of your header file code?
  • Are you able to include the files in other c++ projects without error?
  • Does your project compile if you do not include these headers?
AustinWBryan
  • 3,249
  • 3
  • 24
  • 42
TheBrain
  • 597
  • 6
  • 12
  • I actually solved it by deleting the cpp files and creating them again. It worked second time around. Thanks for the assist though! – Aadithya Feb 23 '15 at 06:59