How to compile a lib?

This is a discussion on How to compile a lib? within the C++ Programming forums, part of the General Programming Boards category; Anyone?...

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699

    How to compile a lib?

    Anyone?
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  2. #2
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    I looked at a lib from my compiler's directory, aren't these already compiled

    > gcc2_compiled. ___gnu_compiled_c _DllMainCRTStartup@12 _DllMain@12 ___do_global_dtors
    The rest was scambled junk.
    The world is waiting. I must leave you now.

  3. #3
    Registered User toaster's Avatar
    Join Date
    Apr 2002
    Posts
    161
    err... do you mean you want to make a class (templated, etc) to become a library so you can use the angle brackets ('<' and '>') in the includes rather than using quotes?

    this is what you would do with MSVC++ if you have it.
    I am not familiar with the others.

    here goes:

    you go to "&New..." dialog under the "&File" menu and go to the "Projects" tab.
    then you select "Win32 Static Library" and create a project name and directory.
    if you have MSDEV <= 4.0, then you choose "Static Library".
    now add the files into the project by selecting Project, Add to Project, and then files.
    for MSC++ <= 4, it's just Insert, Files into Project

    and compile and build.

    now set the directories in MSVC++ to the directory of your created library and there you go.

    * I might be missing some steps so stay alert of errprs when you create the library.
    Last edited by toaster; 08-06-2002 at 06:39 PM.
    think only with code.
    write only with source.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compile crashes certain windows
    By Loduwijk in forum C++ Programming
    Replies: 5
    Last Post: 03-26-2006, 08:05 PM
  2. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 01:28 PM
  3. open scene graph compile issues
    By ichijoji in forum Game Programming
    Replies: 1
    Last Post: 08-04-2005, 12:31 PM
  4. Lib erros when trying to compile C(++) in Kdevelop
    By Maragato in forum Tech Board
    Replies: 1
    Last Post: 07-29-2005, 03:01 PM
  5. compile program?
    By Goosie in forum C++ Programming
    Replies: 9
    Last Post: 06-22-2005, 02:26 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21