Advertisement
Appu82

StaticLib.h

Aug 9th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.50 KB | None | 0 0
  1. //---------------------------------------------------------------------------
  2. //
  3. // Name:
  4. // Author:
  5. // Created:
  6. // Description:
  7. //
  8. //---------------------------------------------------------------------------
  9. #ifndef __STATICLIB_H__
  10. #define __STATICLIB_H__
  11.  
  12. ///////////////////////////////////////////////////////////////////////////////////////////////////////
  13. #if !defined(__DMC__) /*Don't include <windows.h> if you are creating a static lib using Digital Mars.*/
  14. #include <windows.h> /*any win32 GUI library in DMC will not work for a static library, if needed create dll.*/
  15. #endif
  16. #if ( defined(__TINYC__) || defined(__MINGW32__) || defined(_MSC_VER) ) && ! defined(__DMC__)
  17.   #include <errno.h>
  18.   #include <stdint.h>
  19.   #include <stdio.h>
  20.   #include <stdlib.h>
  21. #endif
  22. /*Other than "Digital Mars compiler" most common IDEs recommend to include the standard headers in the library-body's '.h' section
  23. and the '.c' file is left blank without attaching anything but just the library-header. DMC is mainly command-line based.*/
  24. ///////////////////////////////////////////////////////////////////////////////////////////////////////
  25.  
  26. #ifdef __cplusplus
  27. extern "C"
  28. {
  29. #endif
  30.  
  31. double FuncA(double a, double b); //your functions prototype declaration //use this as: z=FuncA(x,y);
  32. double FuncB(double a, double b); //your functions prototype declaration //use this as: o=FuncB(m,n);
  33.  
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37.  
  38. #endif // __STATICLIB_H__
  39.        //"StaticLib.h"
  40.       //write these for your reference.
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement