Advertisement

Include not working in header files

Started by July 29, 2022 09:03 PM
4 comments, last by Oberon_Command 2 years, 4 months ago

Hi, I am trying to use the EA STL to see what it's like, When I try to include their unique ptr header (happens with their other headers too) in my header files, it cannot be opened but this only happens at runtime. In my header files, there are no errors and I can get access to all the code in their headers. I can include it in my .cpp files and my precompiled header and it works fine there. What could be the issue?

None

What is the exact error message?

As for what it is like, it is basically the same set of containers and algorithms you have in the standard library. Paul and the others who worked on it tried to follow what the standard library did, respect the conventions of the standards for extensions, and compare the measured performance across all hardware that did not always have quality standard library implementations. The hope was to get the improvements incorporated into the standard, and some were. It started from the open source STLPort and was customized as needed.

To me it does not feel different from the standard library, and unless you have a specific reason to use it like working on an old DS system for a hobby project that you somehow have a copy of, or are spanning 9 different console systems, you are probably better served by using what came with your compiler.

Advertisement

Hi,

The error I get is C1083 Cannot open Include file: ‘EASTL/unique_ptr’: No such file or directory. I find this error really strange since that there isn't any intellisense erros and it works in my .cpp files and precompiled header. I have worked with library's before and not experienced this.

That's really interesting, is it known which one's were implemented into the main standard?

None

I have found a solution , I have a main project and a static library project. The static library project is where I am calling the includes, but the solution was to also include the EASTL library into the main project. Surely this isn't needed? I haven't had to do this with other library's in a previous project following this structure

None

KielanT said:
The error I get is C1083 Cannot open Include file: ‘EASTL/unique_ptr’: No such file or directory. I find this error really strange since that there isn't any intellisense erros and it works in my .cpp files and precompiled header. I have worked with library's before and not experienced this.

I could state this with more confidence if you posted the actual #include directive that is erroring in addition to the error so we could see whether you used <> or “” around the path, but that indicates that the path isn't reachable from the specific file you are including from. I'm guessing as well that you haven't told the compiler where to look for the EASTL headers? Did you try adding the folder that contains “EASTL” to your include path?

This topic is closed to new replies.

Advertisement