Examples demonstrating how to use the Milvus C++ SDK (v2.6.1) in your project.
This repository contains two examples with different dependency management approaches:
milvus-sdk-cpp-example/
├── without-conan/ # Example WITHOUT Conan (BUILD_FROM_CONAN=OFF)
│ ├── src/main.cpp
│ ├── CMakeLists.txt
│ ├── build.sh
│ └── Makefile
│
└── with-conan/ # Example WITH Conan (BUILD_FROM_CONAN=ON)
├── src/main.cpp
├── CMakeLists.txt
├── conanfile.txt
├── build.sh
└── Makefile
cd without-conan
make build
make runcd with-conan
make build
make run| Feature | without-conan | with-conan |
|---|---|---|
| BUILD_FROM_CONAN | OFF | ON |
| Package Manager | None | Conan 2.x |
| Dependencies | Built from source (FetchContent) | Pre-built packages |
| Build Time | Always slow | Fast after the first time |
| Disk Usage | Per-project | Shared cache |
| Prerequisites | CMake + Git | CMake + Git + Conan |
- CMake 3.14+
- C++14 compatible compiler
- Git
- Conan 2.x:
pip install conan
- Choose
without-conanif you want simplicity and don't have Conan installed - Choose
with-conanif you want faster builds and use Conan in your workflow
Both examples build the same application and provide the same functionality.