Thread: How can i make static library ?

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    1

    How can i make static library ?

    How can i make static library ?

    i make simple dll

    simple.h
    Code:
    //---------------------------------------
    #define EXPORT __declspec (dllexport)
    
    EXPORT int CALLBACK simplefunc(int) ;
    //---------------------------------------
    simple.cpp
    Code:
    //---------------------------------------
    #include  <windows.h>
    #include "Simple.h"
    
    EXPORT int CALLBACK simplefunc(int t) 
    {
         int  x ;
    	 x=2*t;
    	 return x;
         
    }
    //---------------------------------------
    after compile and link i have two file
    simple.dll , simple.lib

    for using this function i insert simple.h in new project and import simple.lib in project.
    and i know for using this function i have many ways.


    ok let go to solve my real problem

    now I want make an static library from this simple DLL ?

    I search on petzold book , msdn, Windows 2000 programing from the ground up by schildt
    and in W32 programing by Brent E.Rector . and nothing found .

    I want to know all information and roles about static library .


    Thanks for your helps

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    project->properties->configuration->general->configuration type->Static Library (.lib)

    Only in a static library you don't explicitly export anything.
    Last edited by abachler; 09-16-2009 at 11:53 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help building/linking to static library
    By Kernel Sanders in forum C++ Programming
    Replies: 19
    Last Post: 08-17-2008, 04:35 PM
  2. C# and C++ static library integration?
    By gotclout in forum C# Programming
    Replies: 5
    Last Post: 06-07-2006, 06:10 AM
  3. Replies: 19
    Last Post: 01-12-2006, 11:04 AM
  4. Using private class members in static functions
    By sethjackson in forum C++ Programming
    Replies: 2
    Last Post: 09-23-2005, 09:54 AM
  5. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 07:48 PM