Zeke Willams
Zeke Willams

Reputation: 180

XCode, Visual Studio, and GitHub with C++

I just learned the basics for git bash and GitHub, and I want to start using a repository for a simple console-based text game in C++ that I will be making. I have a MacBook laptop that I use to code on the go in XCode, and when I am home I use my Windows desktop in Visual Studio.

My question is "How do I run a C++ program from GitHub for both of these IDE's after I have cloned it?"

Should I just get the same IDE for both computers, like Eclipse? I've done quite a bit of research, but everything seems super complicated. I am hoping that there's an easier way, as I'm just a hobby coder. I'm definitely willing to learn; I just hate copying and pasting commands without understanding what they do. Any help is appreciated :)

Edited: Clarified that I know how to clone. The running part is what I don't know how to do.

Upvotes: 1

Views: 451

Answers (1)

g19fanatic
g19fanatic

Reputation: 10921

There really are several ways to do what you're asking.

  1. Store the project files with your repo, usually in a dedicated folder
    • msvc (with version)
    • xcode
    • makefile
    • qt creator
    • kdevelop
    • etc....
  2. generalize the c++ with another build-system like CMake

The first option will/can get annoying but it is usually where most people starting to learn to program go. It isn't too bad so long as you realize you'll probably have problems sharing your project as no one has 'quite' the same exact setup as you.

The second option is where most projects usually end up. You need to learn the intricacies of something like CMake but once you learn, projects can be made for almost any IDE/environment.

Upvotes: 1

Related Questions