Unresolved methods from included hpp file [message #1785079] |
Mon, 09 April 2018 04:44  |
Eclipse User |
|
|
|
I have been trying to work with the nlohmann/json library/project. (I would ling the url but I can't because this is my first post here)
For testing this library I made a new c++ project with my main.cpp and the json.hpp file in the root folder of the project.
But every json method (json::to_cbor(j) and j.size()) in this file is marked as unresolved.
#include "json.hpp"
#include <iostream>
using json = nlohmann::json;
int main(){
json j = {1,2,3};
json::to_cbor(j);
std::cout << j.size() << "+" << j;
}
The project does build though (and runs correctly).
make all
Building file: ../main.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.cpp"
Finished building: ../main.cpp
Building target: JSONTest
Invoking: GCC C++ Linker
g++ -o "JSONTest" ./main.o
Finished building target: JSONTest
I rebuild and re-indexed the project and restarted eclipse but all methods are still marked as unresolved.
The only thing I changed is adding the -std=c++11 flag for it to be able to compile.
In the github project someone else also posted the issue but it could not be reproduced by other users so it was marked closed and implied that it was an Eclipse issue. So now I'm asking here: Is there a way to index this file to be able to autocomplete and resolve the methods?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05902 seconds