Open CptCactus opened 2 years ago
Can you please send me the link to the manual that you were using?
Please note that our most up to date docs are located here: https://cpp.objectbox.io/installation. Could you try once again, but following the steps from there?
I reply here because I have unresolved references as well with 0.17, though I think the Op might have a different problem. For me, the missing symbols seem all to be from the internal namespace. I'm sure my configuration is correct because it compiles and links, fine when I replace include and lib from 0.17 with those from 0.16. Environment is VS 2019, both x64 and x68 are affected. I think you might be missing the inline declaration for some functions in the internal namespace.
Sorry that it took me so long to answer here as i was on vacation. I followed the manual you sent me and checking the ObjectBox version went fine. But when i followed the first example, and try to run it, i get the following errors:
/opt/clion-2022.2.1/bin/cmake/linux/bin/cmake --build /home/jonas/CLionProjects/objtest/cmake-build-debug --target objtest -j 1
[1/1] Linking CXX executable objtest
FAILED: objtest
: && /usr/bin/c++ -g CMakeFiles/objtest.dir/main.cpp.o -o objtest -Wl,-rpath,/home/jonas/CLionProjects/objtest/cmake-build-debug/_deps/objectbox-download-src/lib _deps/objectbox-download-src/lib/libobjectbox.so && :
/usr/bin/ld: CMakeFiles/objtest.dir/main.cpp.o: in function `obx::Box<Task>::put(Task const&, OBXPutMode)':
/home/jonas/CLionProjects/objtest/cmake-build-debug/_deps/objectbox-download-src/include/objectbox.hpp:1794: undefined reference to `Task::_OBX_MetaInfo::toFlatBuffer(flatbuffers::FlatBufferBuilder&, Task const&)'
/usr/bin/ld: CMakeFiles/objtest.dir/main.cpp.o: in function `obx::Box<Task>::get(unsigned long, Task&)':
/home/jonas/CLionProjects/objtest/cmake-build-debug/_deps/objectbox-download-src/include/objectbox.hpp:1724: undefined reference to `Task::_OBX_MetaInfo::fromFlatBuffer(void const*, unsigned long, Task&)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Dear ObjectboxTeam, i tried setting up ObjectBox for c++ as told in the manual. After changing CmakeLists.txt to find the library i now keep getting undefined reference errors
This is my Cmakelists.txt
And this is the error i keep getting
Thank you very much in advance. Jonas