Jump to content

Really stupid question

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
Phoenixz

Phoenixz

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 256 posts
So, I know C/C++ I believe, to an acceptable degree, I been told to learn X library, and Y library.. but.. okay it's all fine to learn them, but.. I don't actually know how to install a library so my compiler program can use it..

Dev-c++/Eclipse are what I normally used. I never wanted to ask this question because it's quite stupid.

So, can anyone explain it to me?
Posted Image

#2
v0id

v0id

    Retired

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,936 posts
I have no experience with Eclipse, but Dev-C++ has its own packaging system for easy installing of extensions and new libraries. These packages are called DevPaks, and you can find tons of them here. If you are able to handle compilers yourself, you are able to install libraries manually, as Dev-C++ uses GCC - this is much harder than the first option though, if you don't have any experience with compilers.

Dev-C++ is by the way very old, and there's no active development on it, so you should maybe consider finding a guide, which I can't provide you, on Eclipse instead, or learn how to install libraries manually.

#3
jwxie518

jwxie518

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,180 posts
is this what you want from dev c++, adding a new library?
9. How can i use the OpenGL library and others ?

All the libraries that comes with Mingw reside in the Lib directory. They are all named in the following way: lib*.a
To link a library with your project, just add in Project options, Further option files :
-lopengl32
This is for including the libopengl32.a library. To add any other library, just follow the same syntax:
Type -l (L in lowercase) plus the base name of the library (filename without "lib" and the ".a" extension).

#4
Phoenixz

Phoenixz

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 256 posts
Thanks for the quick answers. :)
Posted Image

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Unfortunately, many libraries are distributed as source code + make files. If you install MSYS (from the MinGW site), you will gain the ability to run make files from the command line. At that point, you should be able to follow the directions for compiling with gcc.

If you want an updated version of Dev-C++, try wxDev-C++ (which is still maintained). If you're having trouble with a specific library (easy to do!), just give a shout and one of us can try to help you out.

Side note: I found Dev-C++ very helpful when I was first learning C/C++, but have since switched to the command line. It's a little bit harder, but understanding what's happening can be SO worth it.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog