How can i make static library ?

This is a discussion on How can i make static library ? within the Windows Programming forums, part of the Platform Specific Boards category; How can i make static library ? i make simple dll simple.h Code: //--------------------------------------- #define EXPORT __declspec (dllexport) EXPORT int ...

  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,189
    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 12:53 PM.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

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, 05:35 PM
  2. C# and C++ static library integration?
    By gotclout in forum C# Programming
    Replies: 5
    Last Post: 06-07-2006, 07: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, 10: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

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