How to build on Windows~~~~~~~~~~~~~~~~~~~~~~~We use `Visual Studio2019 <https://visualstudio.microsoft.com/de/vs/features/cplusplus/>`__as compiler. We use `cmake <https://cmake.org/download/>`__ as buildtool.1. clone/update the subrepo ``git submodule update --init proto``2. ``mkdir build``3. ``cd build``4. ``conan install .. -g visual_studio -s arch=x86_64 -s build_type=Release -s compiler.toolset=v142 -s compiler.version=16 -s compiler.runtime=MD --build=missing --update``5. ``cmake -B . ..``6. open ``libcaosdb.sln`` with Visual Studio, change the buildtype to ``Release`` and build the project. (You can open Tools/Command Line/Developer Command Prompt and execute ``msbuild libcaosdb.sln /property:Configuration=Release``)
Edited
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
Windows DLL build is supported at a "best effort" basis and we don't recommend using gRPC C++ as a DLL as there are some known drawbacks around how C++ DLLs work on Windows. For example, there is no stable C++ ABI and you can't safely allocate memory in one DLL, and free it in another etc.
That said, we don't actively prohibit building DLLs on windows (it can be enabled in cmake with -DBUILD_SHARED_LIBS=ON), and are free to use the DLL builds at your own risk.
you've been warned that there are some important drawbacks and some things might not work at all or will be broken in interesting ways.
we don't have extensive testing for DLL builds in place (to avoid maintenance costs, increased test duration etc.) so regressions / build breakages might occur
This may or may not be related to the issues for libcaosdb/liblinkahead
Manually removing stdc++fs.lib from the linker input gets rid of the linker error and the caosdb project and cxxcaosdbcli compiles sucessfully. We need to find out out, which canon/cmake settings causes stdc++fs.lib to appear in the linker input.
However, the ccaosdb project still fails with several unresolved symbol errors:
1>------ Build started: Project: ccaosdb, Configuration: Release x64 ------1>Auto build dll exports1> Creating library C:/Code/LinkAhead/linkahead-cpplib/build/lib/ccaosdb.lib and object C:/Code/LinkAhead/linkahead-cpplib/build/lib/ccaosdb.exp1>ccaosdb.obj : error LNK2019: unresolved external symbol "struct caosdb::entity::v1::ListDataTypeDefaultTypeInternal caosdb::entity::v1::_ListDataType_default_instance_" (?_ListDataType_default_instance_@v1@entity@caosdb@@3UListDataTypeDefaultTypeInternal@123@A) referenced in function caosdb_entity_datatype_get_datatype_name1>ccaosdb.obj : error LNK2019: unresolved external symbol "struct caosdb::entity::v1::PropertyDefaultTypeInternal caosdb::entity::v1::_Property_default_instance_" (?_Property_default_instance_@v1@entity@caosdb@@3UPropertyDefaultTypeInternal@123@A) referenced in function "public: __cdecl caosdb::entity::Property::Property(class caosdb::entity::v1::Property *)" (??0Property@entity@caosdb@@QEAA@PEAV0v1@12@@Z)1>ccaosdb.obj : error LNK2019: unresolved external symbol "struct caosdb::entity::v1::ReferenceDataTypeDefaultTypeInternal caosdb::entity::v1::_ReferenceDataType_default_instance_" (?_ReferenceDataType_default_instance_@v1@entity@caosdb@@3UReferenceDataTypeDefaultTypeInternal@123@A) referenced in function caosdb_entity_datatype_get_datatype_name1>ccaosdb.obj : error LNK2019: unresolved external symbol "struct caosdb::entity::v1::ScalarValueDefaultTypeInternal caosdb::entity::v1::_ScalarValue_default_instance_" (?_ScalarValue_default_instance_@v1@entity@caosdb@@3UScalarValueDefaultTypeInternal@123@A) referenced in function "public: virtual bool __cdecl caosdb::entity::Value::GetAsBool(void)const " (?GetAsBool@Value@entity@caosdb@@UEBA_NXZ)1>ccaosdb.obj : error LNK2019: unresolved external symbol "struct caosdb::entity::v1::VersionDefaultTypeInternal caosdb::entity::v1::_Version_default_instance_" (?_Version_default_instance_@v1@entity@caosdb@@3UVersionDefaultTypeInternal@123@A) referenced in function caosdb_entity_entity_get_version_id1>C:\Code\LinkAhead\linkahead-cpplib\build\bin\ccaosdb.dll : fatal error LNK1120: 5 unresolved externals1>Done building project "ccaosdb.vcxproj" -- FAILED.