I have an opensouce project, that is been used c++ as its language. Now i need to use visual studio 2008, as the IDE in making some changes in the source. How do i import this project to my VS2008 environment? is there any converter i can use that could convert the c++ project to be opened in VS2008?

Dani AI

Generated

Following 's question and 's pointer to CMake, a concise, reliable path is to generate a native VS2008 solution from any existing CMakeLists.txt rather than converting files by hand. This keeps build logic intact and creates a .sln/.vcproj set that Visual Studio can open. For projects without CMake, creating a Visual C++ "Makefile Project" or adding sources to a new solution are common fallbacks, but they require manual configuration of include paths, libraries, and compiler flags.

Common CMake workflow (out-of-source build):

mkdir build
cd build
cmake -G "Visual Studio 9 2008" ..

for 64-bit:

cmake -G "Visual Studio 9 2008 Win64" ..

Open the generated .sln in VS2008 and select Debug/Release. Notes: Visual Studio generators produce multi-configuration solutions (so CMAKE_BUILD_TYPE is not used); if CMake cannot find VS2008, ensure the IDE is installed and visible to CMake. Typical fixes after import: set Additional Include Directories and Additional Library Directories in Project Properties, fix mismatched runtime library (Project -> Properties -> C/C++ -> Code Generation -> Runtime Library), and resolve architecture or POSIX-specific API differences.

If no CMakeLists.txt exists, consider adding one for future portability or use the Makefile Project template to call the upstream make. CMake generator details and supported generator names are documented at the CMake site: CMake generators manual. Finally, remember that VS2008 lacks modern C++ features; newer compilers may be required for codebases using post-C++03 language features.

Recommended Answers

All 2 Replies

Can you use CMake to generate a Visual Studio project for it? (does it have a CMakeLists.txt in the main directory)

oh yeah. that would solve i guess, thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.