jeudi 26 mai 2016

How to import external libraries and projects into my C++ Project with the GUI?

Okay, so I know Java and have fiddled around with libGdx for quite a while now. C++ is the "language-to-know" in the Game Development industry, it seems, and since I want to be a game developer when I graduate, I have determined that it is nothing but beneficial to learn the language. I have learned the basics of memory-management and have applied my knowledge by;

  1. Learning how to parse complex text formats (you know, anything more complex than xml)
  2. Writing a parser for a pseudo-language that I can use to serialize a C++ Object with and express basic math and command/function functionality.

Now I want to apply my knowledge doing something more interesting; making a small game! I would prefer putting off learning how microprocessors and GPU work until ~College, so I need to use a framework of some sort. To do this I need to be able to import code from an external library. In Java, we generally put our libraries into a libs folder which is linked to the core project by using fancy maven/gradle set ups.

I set up the GCC compiler and downloaded the latest Code::Blocks binaries and installed them on my outdated Windows laptop (It was quite an annoying surprise that I had to download a compiler and IDE separately, as I am an Eclipse boy). The reason I am using Code::Blocks and not Visual Studio C++?

I am broke and cannot afford express, and Community is still 2 frickin gigs and runs like molasses going uphill on a cold winter day (my computer only has 2 gigs of RAM because I was too cheap to put in an extra $200 into a laptop that has a rough lifespan of 1 year) while Code::Blocks is 500 megs and runs like a charm.

Anyway, enough of my ranting, the problem is that in Java we can import an external library with a few clicks in any self-respecting IDE. C++ seems to be different. I googled several libraries that would handle my needs adequately, as I just needed a rendering library. Oxygine seems to be the best, with Angel2D being the second one on my list. I did some googling yahooing but found little of use. As a matter of fact, it seems that C++ lacks the concept of 'importing' external libraries. #import seems to only work on core language libraries and project files. The closest thing I have found was dynamically loading libraries, but even this is not clear.

Aucun commentaire:

Enregistrer un commentaire