Home  >  Q&A  >  body text

如何将github上面人家写好的c++文件跑在自己的vs上面?

比如我想在自己本地跑https://github.com/kallisti5/...这个开源项目的代码,里面有自己写好的c++文件和资源,代码结构如下

表示不太能懂怎么用它的代码在本地vs跑出效果来,是要将include、scr文件拷到新建的一个工程里吗?似乎不能直接考进来,还是需要怎么引用才能使用,求指导。

ringa_leeringa_lee2714 days ago741

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 14:59:11

    If Git is also compiled using VS, then look at the SRC directory to see if there is a VS project configuration file. Generally, SRC stores source code files.

    If VS compilation is not available on Git, then you need to create a VS project, then add the source files to the project, and then you can use VS to compile the source code.

    C++ source code, I can use any IDE tool to compile. However, the configuration file of each IDE tool is different.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 14:59:11

    Different project compilation methods vary greatly, be sure to read the README! !
    This project uses scons, an automatic build tool written in Python. I took a look at its SConstruct file and found that it is not designed for Windows. So I have some doubts about whether this library can run under Windows and whether porting work has been done.
    For this kind of relatively simple project, you can create a blank C++ project directly in VS without using make or other automatic tools (directly use the current directory as the project root directory), and add all the files in src. In the "source file" branch, the files in include are added to the "header file". And add this include directory to the C++ include directory in the project properties.
    In addition, add the header file path and library of the SDL library to the corresponding items of the project properties.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 14:59:11

    You might as well ask directly how to edit this Guisan project. I took a look and found that it is cross-platform and very painful to compile. If you are a novice, you should compile the SDL first and then talk about it

    reply
    0
  • Cancelreply