C++ (beginner) and creating applications/games

Hi-R

New Member
Reaction score
0
Hi. I am a new programmer and jst know a good few basics of c++. Firstly, I would like a little guidance on what libraries are and how do they help?
secondly, How do i attach them to my Visual studio and begin with my work?
Thirdly, Most importantly, my main purpose is to know: how to create a simple application using sfml or Qt(these are libraries? )??? and then i would further need some assistance on creating a game using some graphics library.

Please guide me, with what you knwo best.Being a total beginner i have no ideas!
Thanks alot! Reply soon pleaseeeeee :D
 

Varine

And as the moon rises, we shall prepare for war
Reaction score
803
A library is just a template of classes; it's basically just pre-written commands that you use throughout programs. You should be able to just add them into the linker search path. I'm not sure how to do that in VS as I don't use that, however I'm sure a search on Google would find the answer.

As for the third one, those are frameworks, not libraries. As to how to use them, RTFM.
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
1) A library is basically just code that someone else wrote for you, and packaged it up nicely so you can use it relatively easily.

2) How to add them to Visual Studio?
Most (not all) libraries come in a normal folder. Inside this folder is a bunch of stuff, including two folders called "lib" and "include". "lib" contains the actual library, while "include" contains a bunch of info that Visual Studio (and you) need to use the library.

In Visual Studio you'll have to add these two folders.
Open or create a C++ project, then open up your Project Properties.

Under "Configuration Properties -> C/C++ -> General -> Additional Include Directories" you add the path to the "include" folder.

Under "Configuration Properties ->Linker -> General -> Additional Library Directories" you add the path to the "lib" folder.

Often times you'll have to add the name of the library files to "Configuration Properties -> C/C++ -> Input -> Additional Dependencies". But what exactly you have to add there differs from library to library. Most of the time you can find the right results by looking at the official websites.

3) How to create stuff with SFML: http://www.sfml-dev.org/tutorials.php.
Same goes for Qt. That stuff is simply too complex and comprehensive to simply explain in a post. You'll have to dive in yourself. There are plenty of examples and tutorials out there, ready to be found and read by you :)

===================

And I'd like to mention that SFML and Qt are indeed libraries. Hence Simple and Fast Media Library.

Being a library and being a framework is not mutually exclusive.
 

Varine

And as the moon rises, we shall prepare for war
Reaction score
803
Being a library and being a framework is not mutually exclusive.

No, but in general you call the library and the framework calls you. I've never used either of those, but I'd imagine that they act similarly to most general frameworks.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top