Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


A ceres-solver wrapper for Visual Studio. Tested on Visual Studio 2010, 2012 and 2015, using Win32/x64 on both Debug and Release.

For a wrapper that uses ceres-solver 1.9.0 and CXSparse, go to the CXSparse branch at

Conversion to newer versions of Visual Studio should be performed automatically by the IDE. If projects are not compiling, make sure that the platform toolset matches the version of Visual Studio in the project properties.

Sample projects (using ceres-solver's code examples) are also embedded in the solution.

How to clone with submodules

This repository contains git submodules. In order to clone it appropriately the submodules need to be initialized

git clone
cd ceres-windows
git submodule update --init --recursive

Static Linkage

If an external project is statically linked to ceres-solver, the following settings have to be modified in the linked project. In Project properties->C/C++->General->Preprocessor Definitions, add the following flags:


To add the include and library folders, first create an environment variable that points to the folder you cloned this repository into, e.g., CERES_WINDOWS_DIR=c:\ceres-windows.

In Project properties->C/C++->General->Additional Include Directories, add:


In Project properties->Linker->General->Additional Library Directories, add:


Make sure you compile ceres-solver for each platform and configuration you intend to use (x64/Release etc.).

Finally, in Project properties->Linker->Input->Additional Dependencies, add:



  • Eigen ( Version 3.3 or above. It's a header-only library, so simply extract Eigen to the solution directory and it should compile. Alternatively, set it up in one of your default include directories.



The license of this wrapper is the same as ceres-solver and glog, New BSD license.


An easy to use ceres-solver port for Visual Studio on Windows, using Eigen for sparse linear algebra and Google glog for logging.







No packages published