Reputation: 41
I just want to know how to use visual studio projects that came from the internet. I mean I don't want to retype (copy and paste) all of the codes into a new project. Is there a way to open a vs project that came from the internet that acts as a whole project (the cpp can find the header files)
Upvotes: 1
Views: 63
Reputation: 43662
Visual studio has solutions and projects. A solution might have multiple projects. Projects have information regarding files to be compiled and how to compile them while solutions usually have configurations for the various projects and user-specific settings (e.g. where windows have been moved and which ones have been opened).
You should be fine downloading both as long as you have a valid project or solution file and its necessary dependencies.
Mismatching compilers will activate a conversion process that should take care of different versions of MSVC.
A word of advice though:
A project might not be compilable if who created it used absolute paths instead of relative ones to the project root (i.e. it depends on who created the project)
You should not blindly build any project that came from the internet. Pre/Post compilation steps have macros and commands that, even when the code is not executed, might cause harm to your system.
Short story: if you download a complete solution or project made by someone slightly competent and trustworthy, you should be fine by just opening the sln
or proj
file and launching a compilation command.
Upvotes: 1