0

So, this question is maybe a duplicate of Why does QT not recognize my header file? cannot open include file No such file or directory, but it never got any decent answers. Please go easy on me as I'm not a software engineer.

I have this very complex program written on Kubuntu Qt several years ago. I'm trying to port it over to Windows (I'll skip the details on why), but I keep getting these

C1083 "cannot open include file ... no such file"

errors saying that some of my headers don't exist. I compiled it recently in Linux to make sure that I'm not crazy, but it still throws plenty of errors in Windows.

This program has a lot of forward declarations by nature. Are there some precedence differences between gcc and the msvc2012 compilers? Is there some program that will follow the order of the includes and let me know where it's getting stuck?

Community
  • 1
  • 1
UndeadBob
  • 1,110
  • 1
  • 15
  • 34

1 Answers1

0

I brought in some help for this and he suggested that I add the location of the my source code to the INCLUDE_PATH. I thought that was silly, but it actually worked. I guess unix's compiler just made the (smart) assumption.

Sorry if answering your own question violates posting rules.

UndeadBob
  • 1,110
  • 1
  • 15
  • 34
  • For my own edification, I'd love if someone could explain why MSVC 2012 compilers don't already have the source code's location added to their path (or what I accidentally did wrong). – UndeadBob Jun 06 '14 at 18:01
  • Did the `#include` directive use the `<...>` syntax or the `"..."` syntax? (BTW, answering your own question is perfectly acceptable; getting useful question and answers is the goal.) This is covered in the FAQ: http://stackoverflow.com/help/self-answer – Keith Thompson Jun 06 '14 at 18:07
  • Thanks for the reassurance. I used the `"..."` syntax for my own headers and `<...>` for Qt headers, but the problem was with my own personal headers. – UndeadBob Jun 06 '14 at 19:02