Thread: How to compile a lib?

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas

    How to compile a lib?

    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

  2. #2
    Join Date
    Sep 2001
    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
    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, 09:05 PM
  2. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02: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