CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 20

Thread: C++ and 'Make'

Hybrid View

  1. #1
    Join Date
    Feb 2008
    Posts
    53

    [UNRESOLVED] C++ and 'Make' - how to install new libraries in Windows?

    I'm still a novice at C++, and could use some assistance here.

    Every time I download a new API, Toolkit, Library, etc. I get a folder, (usually with the name of the library) that typically contains the following subfolders:

    "builds", "devel", "docs", "include", "objs", "src" and sometimes other folders like "tools", and "resources"

    The folder also typically includes some files with the 'make' prefix, usually one is an exe. I understand these can somehow be used to compile the source files and move the headers, dll's, and obj files to their appropriate locations, but i'm not quite sure how to use them.

    If someone can either give me, or link me to, an explanation for how you typically install a new library, and a little about whats going on, I'd be most appreciative!
    Last edited by Mikau; June 29th, 2008 at 02:50 AM.

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: C++ and 'Make'

    You aren't likely to find an exe, because that's a Windows extension, and Windows software usually isn't packaged in that manner. Did you mean a Unix executable?

    Often libraries come with readmes that explain what you need to do. Typically, however, they'll have a configure script---they test your system to make compilation decisions, then run Makefiles to build the library, then copy it to the appropriate place (usually /usr/lib/).

  3. #3
    Join Date
    Feb 2008
    Posts
    53

    Re: C++ and 'Make'

    thanks for the response!

    A configure script, huh? Well I do have a 'configure' file here, of type 'File', also a file called "modules" of type 'cfg' but i have no idea how to use them. Do I access them from the command line or something?

    The particular library I'm currently trying to install, does not appear to have a readme. Well it does, but its of type File, and only says a sentence or two if opened in notepad.
    Last edited by Mikau; June 28th, 2008 at 12:50 AM.

  4. #4
    Join Date
    May 2008
    Posts
    96

    Re: C++ and 'Make'

    That is a typical *nix software setup. If you are trying to compile under Windows, you will need to get MSYS and MinGW and compile it under the bash command shell that comes with msys.

    To do it, unpack the downloaded stuff into a directory, change to that directory (in the msys shell), and type the following three commands:
    Code:
    ./configure
    make
    make install
    You will likely have to wait a bit between each one. Once done you can delete the unpacked directory if you like (don't forget the html documentation though). The executable file will be in the "release" directory (if you haven't deleted it) and after "make install" it will also be in the /usr/bin/ directory (which on Windows is probably C:\Msys\1.0\bin).

    Hope this helps.

    Msys isn't a perfect solution, and won't compile everything you find on the net.

    Hope this helps.

  5. #5
    Join Date
    Feb 2008
    Posts
    53

    Re: C++ and 'Make'

    Well I installed MinGW okay. (though i can't say i know what it is)

    but MSys has been a problem.

    on their download page at sourceforge:
    http://sourceforge.net/project/showf...?group_id=2435

    I am given 3 options between MSYS Base System, MSYS Supplementary Tools, and MSYS System Builder. Furthermore, each of these catagories contains several files available for download, and i'm unable to distinguish which I need.

  6. #6
    Join Date
    Feb 2008
    Posts
    53

    Re: C++ and 'Make'

    isn't there a way I can copy the library into my project folder and compile it exclusively with that project?

    I've been trying to gain proficiency with C++ for a while. I'm learning more and more about the language, but I still am always lost when trying to install new libraries. I've been hunting for good articles to explain the process without success. Its really frustrating and discouraging.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured