Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing including header file "vector" #9

Closed
andywu0913 opened this issue Apr 3, 2020 · 2 comments
Closed

Missing including header file "vector" #9

andywu0913 opened this issue Apr 3, 2020 · 2 comments

Comments

@andywu0913
Copy link
Contributor

When I was compiling the imgui example code with the imfilebrowser.h included, it showed the error messages below.

In file included from main.cpp:9:
./imfilebrowser.h:134:34: error: implicit instantiation of undefined template 'std::__1::vector<const char *,
      std::__1::allocator<const char *> >'
        std::vector<const char*> typeFilters_;
                                 ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:216:28: note: template is declared here
class _LIBCPP_TEMPLATE_VIS vector;
                           ^
In file included from main.cpp:9:
./imfilebrowser.h:147:33: error: implicit instantiation of undefined template
      'std::__1::vector<ImGui::FileBrowser::FileRecord, std::__1::allocator<ImGui::FileBrowser::FileRecord> >'
        std::vector<FileRecord> fileRecords_;
                                ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:216:28: note: template is declared here
class _LIBCPP_TEMPLATE_VIS vector;
                           ^
2 errors generated.

@andywu0913
Copy link
Contributor Author

Include vector can resolve it:)

#include <vector>

AirGuanZ added a commit that referenced this issue Apr 3, 2020
Include vector in header to fix issue #9.
@AirGuanZ
Copy link
Owner

AirGuanZ commented Apr 3, 2020

fixed. tks for the pr

@AirGuanZ AirGuanZ closed this as completed Apr 3, 2020
pthom pushed a commit to pthom/imgui-filebrowser that referenced this issue Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants