Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error when including std::vector in separate file in Qt Project. Why?
QtWS25 Last Chance

Error when including std::vector in separate file in Qt Project. Why?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 252 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bogong
    wrote on last edited by bogong
    #1

    Hello all!
    Got the error when trying to include std::vector in separate file:

    Screenshot 2020-01-19 at 14.10.08.png

    And there are error in compile log:

    Screenshot 2020-01-19 at 14.14.43.png

    When I am using it in plain main.cpp everything OK:

    Screenshot 2020-01-19 at 14.07.28.png

    Why it's happening? What am I missing?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      There is a file 'vector' somewhere in your include path which is messed up - find it and fix it.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      B 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        There is a file 'vector' somewhere in your include path which is messed up - find it and fix it.

        B Offline
        B Offline
        bogong
        wrote on last edited by bogong
        #3

        @Christian-Ehrlicher Issue solved. There are no file. It was, somehow problem in the same directory naming. The project directory named "Vector", somehow it's been affecting including std::vector. When project directory name changed and not equal to "vector" - everything works fine.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved