简体   繁体   中英

Learning C++, questions about environment

I am asking this here because I think my last question was more than one question so creating another question seemed appropriate. However, you can close it if it does not adhere to the SO policies.

In this comment on my last question , I was given a nice advice by Michael Aaron Safyan (at least I liked it):

Once you feel somewhat comfortable in the language, then I would recommend taking a look at Google Code and seeing if there are any C++ projects that are in need of some help.

I am going to be developing on XCode on Mac. My question is that do I have to take that into consideration when developing for C++ projects. Is environment consideration project based or can a generic OS/Env be used like Mac/Xcode or Ubuntu/Anjuta?

Thanks.

In theory, no; in practice, yes.

  • For core algorithms, the environment wouldn't matter.
  • For UI, the platform matters termendously.

Unfortunately, UI drives most applications. Usually, the core algorithms are trivial.

Even in the rare cases where UI doesn't matter, you would still have the problem of common libraries.

When it comes to C++ development there are two major camps: MSVC, and gcc. Porting a project between them is not always easy, so since Xcode is gcc-based as long as you stick to gcc projects (typical filenames to look for are configure and Makefile ) you should not have a problem.

If a project has been ported, or is portable, to your platform of choice, of course you can work on it.

But if a project is specific to a certain platform, and that's not your chosen one (eg, a Windows application), you will have a hard time working on that project as you cannot compile the source, let alone have a test run.

Of course, today there are many virtualization solutions available that allow you to run a different OS in a virtual machine. In my opinion, though, that just adds another layer of problems, especially for a novice programmer.

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