ORBSLAM code, use Eclipse to import project from cmake
2016-11-22 13:15
375 查看
Preconditions:
1, first we should make sure the compile with build.sh under ORB_SLAM2-master is OK.
2, then if we want to build debug version, we need to duplicate the build.sh to build_debug.sh and change the "-DCMAKE-BUILD_TYPE=Release" to "-DCMAKE-BUILD_TYPE=Debug"
3, make sure build_debug.sh can also build pass.
It's convenient to use Eclipse to manage and build your code, in order to utilize Eclipse, we need to convert the project managed by cmake to project managed by Eclipse, how to do it?
1, at the same level as your ORB slam code, make dir "build_debug".
for example, your Slam code is at ~/Downloads/larry/ORB2/ORB_SLAM2-master
then you need to create a dir : ~/Downloads/larry/ORB2/build_debug
the reason we don't create build_debug under ORB_SLAM2-master is that Eclipse doesn't support this kind of structure well right now.
2,
$ cd ORB2
$ cd build_debug
$ cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../ORB_SLAM2-master
$ you will find the ".cproject" and ".project", which are the project files generated for Eclipse and can be used for later import from Eclipse.
3,
Eclipse import the project generated from cmake:
In Eclipse:
File -> Import -> General -> Existing Projects into Workspace -> Next
In "Import Projects" Dialogue, select "Select root directory" and import the generated eclipse project from "~/Downloads/larry/ORB2/build_debug"
4, Then we can build from Eclipse:
Click the button "Build Default" in Eclipse to build the whole project, pay attention to the Console output.
1, first we should make sure the compile with build.sh under ORB_SLAM2-master is OK.
2, then if we want to build debug version, we need to duplicate the build.sh to build_debug.sh and change the "-DCMAKE-BUILD_TYPE=Release" to "-DCMAKE-BUILD_TYPE=Debug"
3, make sure build_debug.sh can also build pass.
It's convenient to use Eclipse to manage and build your code, in order to utilize Eclipse, we need to convert the project managed by cmake to project managed by Eclipse, how to do it?
1, at the same level as your ORB slam code, make dir "build_debug".
for example, your Slam code is at ~/Downloads/larry/ORB2/ORB_SLAM2-master
then you need to create a dir : ~/Downloads/larry/ORB2/build_debug
the reason we don't create build_debug under ORB_SLAM2-master is that Eclipse doesn't support this kind of structure well right now.
2,
$ cd ORB2
$ cd build_debug
$ cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../ORB_SLAM2-master
$ you will find the ".cproject" and ".project", which are the project files generated for Eclipse and can be used for later import from Eclipse.
3,
Eclipse import the project generated from cmake:
In Eclipse:
File -> Import -> General -> Existing Projects into Workspace -> Next
In "Import Projects" Dialogue, select "Select root directory" and import the generated eclipse project from "~/Downloads/larry/ORB2/build_debug"
4, Then we can build from Eclipse:
Click the button "Build Default" in Eclipse to build the whole project, pay attention to the Console output.
相关文章推荐
- eclipse中,项目有红叉之-Project configuration is not up-to-date with pom.xml. Select: Maven->Update Project... from the project context menu or use Quick Fix
- 1. Introduce how to import the Spring Framework sourcecode into an eclipse project 【analyze spring framework source 】
- Eclipse导入项目:No projects are found to import
- How to use gcov to get code coverage from static library in iphone?
- Eclipse导入工程提示“No projects are found to import”
- Copy code from eclipse to word, save syntax.
- How to use eclipse to debug android source(from google official site)
- How to use an Outlook Object Model from Visual C++ by using a #import statement
- Eclipse导入项目:No projects are found to import
- Eclipse导入Java项目时“No projects are found to import”错误的处理
- Eclipse导入项目:No projects are found to import
- How to use the Journal Import Correction Screen - from Metalink
- How to create unit test folder separated from src folder in eclipse project?
- Use View.isInEditMode() in your custom views to skip code when shown in Eclipse
- import c++ project to eclipse cdt with exiting makefile
- How to Use Session State Provider (Microsoft Project code named Velocity)
- How to import Gradle project into eclipse
- How to create a project from existing source in Eclipse and then find it?
- Eclipse 导入安卓项目 No projects are found to import解决方案
- Ten things to do with IIS(From CodeProject website)