开发者

Making a GCC based Project Build and Run under Visual Studio 2010

I have been trying to port my C++ based mass data transport protocol project into visual studio 2010 with no success :(

The code I have been working on is fully compatible with Win based systems..well this is what my mentor also says :) But I have not been able to make the project build and run using my existing *.h & *.cpp files under VS 2010.

The Project basically is a API under which i have 4 separate applications. The hierarchy would be:

  1. SRC FOLDER- all the *.h and respective *.cpp files

  2. APP FOLDER- 4 applications (the API / library and some *.h files to be available before linking such as the final dll file under SRC folder & the main header file under APP folder)

I do also have a makefile as when the project was developed on Linux platform but I have no idea how to implement the same on Visual Studio 2010

FYI: VS 2010 on compiling reports that开发者_如何学编程 there are missing header files such as <cstdlib>, <unistd> but my best bet is this is not the real prob. but the prob. lies in the way I make the project build itself. I don't know should I go with making a dynamic dll project for the main library and then make the 4 empty c++ projects inside that for the 4 respective applications..?

Cheers, echo9


I would recommend that you parse the data that you need from the working .mak file that you used previously. Create an empty project & sln, then add the contents of the "src" by using "add->existing files" in the file menu.

At that point open up the project configuration settings and go through the C++ and linker settings one by one. At each step have a look at the linux .mak file and see that you are choosing equivalent options and path settings. In particular make sure that you add all of the necessary include paths to where your .h files are.

That's what I would do anyways... same process as porting forwards old MSVC4 .mak projects to a modern version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜