简体   繁体   中英

How can I port an Eclipse C++ project to Visual Studio?

I have a very complicated project created in Eclipse as a Perforce project, converted to a C++ project. Is there a way to port the project to one or more Visual Studio 2013 Express projects?

I found that I can drag a sub-directory from Windows Explorer directly into a MSVS filter. Using that method, only .c , .cpp , .h , and .hpp files wind up in the filter. It is a big time saver over:

Right-click > Add > Existing Item (or Alt + Shift + A ), and then navigating and picking only the source and include files, one directory at a time.

Disclaimer: This is really not a satisfactory solution because there are so many nested sub-directories and the need to update as files are modified.

If it is complicated in the sense it just have many source files but it produces a single executable then you could use the Visual Studio option to create a project from existing code. Go to 'File', 'New', 'Project from existing code' and follow the wizard. That should help if all source code is under relatively self-contained directories. From there, you would need to set the rest manually. If it is a complicated build process that generated many binaries then you would be out of luck. Notice that if you can build from the command line then visual studio can act as an editor only.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM