Changeset 5:aee63784ea64 in hlibpp


Ignore:
Timestamp:
May 10, 2010 1:49:59 PM (3 years ago)
Author:
vadim@…
Branch:
default
Message:

Implement exports for DLL builds on WIN32 paltform

Location:
src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • src/hl_exception.h

    r0 r5  
    4444//STL 
    4545#include <string> 
     46//----------------------------------------------------------------------  
     47//hl includes 
     48#include "hl_types.h" 
    4649 
    4750//---------------------------------------------------------------------- 
     
    6467 *              project 
    6568 */   
    66 class hlException 
     69class HLPP_EXPORT hlException 
    6770{ 
    6871        private: 
  • src/hl_hashwrapper.h

    r0 r5  
    22 * hashlib++ - a simple hash library for C++ 
    33 *  
    4  * Copyright (c) 2007-2010 Benjamin Grüdelbach 
     4 * Copyright (c) 2007-2010 Benjamin Grᅵdelbach 
    55 *  
    66 * Redistribution and use in source and binary forms, with or without modification, 
     
    8383#include <iostream> 
    8484 
     85#include "hl_types.h" 
     86 
     87HLPP_EXPIMP_TEMPLATE 
     88template class HLPP_EXPORT std::allocator<char>; 
     89 
     90HLPP_EXPIMP_TEMPLATE 
     91template class HLPP_EXPORT std::_String_val<char, std::allocator<char> >; 
     92 
     93HLPP_EXPIMP_TEMPLATE 
     94template class HLPP_EXPORT std::basic_string<char, std::char_traits<char>, std::allocator<char> >; 
     95 
    8596//----------------------------------------------------------------------         
    8697//hashlib++ includes 
    8798#include "hl_exception.h" 
     99 
     100 
     101         
    88102 
    89103//----------------------------------------------------------------------         
     
    105119 *  updateContext(). Finaly hashIt() is called to return the hash. 
    106120 */   
    107 class hashwrapper 
     121class HLPP_EXPORT hashwrapper 
    108122{ 
    109123        private: 
  • src/hl_md5.h

    r0 r5  
    106106 *              you should use the md5wrapper class instead of MD5. 
    107107 */   
    108 class MD5 
     108class HLPP_EXPORT MD5 
    109109{ 
    110110 
  • src/hl_md5wrapper.h

    r0 r5  
    6868 *              and hashIt() to create a hash. 
    6969 */   
    70 class md5wrapper : public hashwrapper 
     70class HLPP_EXPORT md5wrapper : public hashwrapper 
    7171{ 
    7272        protected: 
  • src/hl_sha1.h

    r0 r5  
    138138 *              you should use the sha1wrapper class instead of SHA1. 
    139139 */   
    140 class SHA1 
     140class HLPP_EXPORT SHA1 
    141141{ 
    142142        private: 
  • src/hl_sha256.h

    r0 r5  
    135135 *              you should use the sha256wrapper class instead of SHA256. 
    136136 */   
    137 class SHA256 
     137class HLPP_EXPORT SHA256 
    138138{ 
    139139        private: 
  • src/hl_sha256wrapper.h

    r0 r5  
    6969 *              and hashIt() to create a hash. 
    7070 */   
    71 class sha256wrapper : public hashwrapper 
     71class HLPP_EXPORT sha256wrapper : public hashwrapper 
    7272{ 
    7373        private: 
  • src/hl_sha2ext.h

    r0 r5  
    135135 *              you should use the sha384wrapper or sha512wrapper classes. 
    136136 */   
    137 class SHA2ext 
     137class HLPP_EXPORT SHA2ext 
    138138{ 
    139139        private: 
  • src/hl_sha384wrapper.h

    r0 r5  
    6868 *              and hashIt() to create a hash. 
    6969 */   
    70 class sha384wrapper : public hashwrapper 
     70class HLPP_EXPORT sha384wrapper : public hashwrapper 
    7171{ 
    7272        private: 
  • src/hl_sha512wrapper.h

    r0 r5  
    6868 *              and hashIt() to create a hash. 
    6969 */   
    70 class sha512wrapper : public hashwrapper 
     70class HLPP_EXPORT sha512wrapper : public hashwrapper 
    7171{ 
    7272        private: 
  • src/hl_types.h

    r0 r5  
    22 * hashlib++ - a simple hash library for C++ 
    33 *  
    4  * Copyright (c) 2007-2010 Benjamin Grüdelbach 
     4 * Copyright (c) 2007-2010 Benjamin Grᅵdelbach 
    55 *  
    66 * Redistribution and use in source and binary forms, with or without modification, 
     
    7272#endif 
    7373 
     74#if defined(WIN32) || defined(_WIN32_WCE)  
     75#ifdef hl___EXPORTS 
     76#define HLPP_EXPORT __declspec(dllexport) 
     77#define HLPP_EXPIMP_TEMPLATE 
     78#else 
     79#define HLPP_EXPORT __declspec(dllimport) 
     80#define HLPP_EXPIMP_TEMPLATE extern 
     81#endif 
     82#else 
     83#define HLPP_EXPORT 
     84#define HLPP_EXPIMP_TEMPLATE 
     85#endif 
     86 
     87 
    7488 
    7589//----------------------------------------------------------------------         
Note: See TracChangeset for help on using the changeset viewer.