File: SQLiteCppExport.h

package info (click to toggle)
sqlitecpp 3.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,608 kB
  • sloc: ansic: 166,965; cpp: 3,720; python: 2,374; xml: 14; sh: 12; makefile: 8
file content (38 lines) | stat: -rw-r--r-- 1,103 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
 * @file    SQLiteCppExport.h
 * @ingroup SQLiteCpp
 * @brief   File with macros needed in the generation of Windows DLLs
 *
 *
 * Copyright (c) 2012-2023 Sebastien Rombauts (sebastien.rombauts@gmail.com)
 *
 * Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
 * or copy at http://opensource.org/licenses/MIT)
 */

#pragma once

/*
* #define SQLITECPP_COMPILE_DLL to compile a DLL under Windows
* #define SQLITECPP_EXPORT to export symbols when creating the DLL, otherwise it defaults to importing symbols
*/

/* Windows DLL export/import */
#if defined(_WIN32)&& !defined(__GNUC__) && defined(SQLITECPP_COMPILE_DLL)
    #if SQLITECPP_DLL_EXPORT
        #define SQLITECPP_API __declspec(dllexport)
    #else
        #define SQLITECPP_API __declspec(dllimport)
    #endif    
#else    
    #if __GNUC__ >= 4
        #define SQLITECPP_API __attribute__ ((visibility ("default")))
    #else
        #define SQLITECPP_API
    #endif
#endif

#if defined(WIN32) && defined(SQLITECPP_COMPILE_DLL)
    #pragma warning( disable : 4251 )
    #pragma warning( disable : 4275 )
#endif