so that's how libraries work
This commit is contained in:
		@@ -5,6 +5,7 @@
 | 
			
		||||
#include <map>
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
#include "commands.hpp"
 | 
			
		||||
#include "json.hpp"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
@@ -27,8 +28,11 @@ namespace cellar {
 | 
			
		||||
                string canonical_path;
 | 
			
		||||
                Bottle();
 | 
			
		||||
        };
 | 
			
		||||
		map<string, Bottle> get_bottles();
 | 
			
		||||
		extern map<string, Bottle> get_bottles();
 | 
			
		||||
	}
 | 
			
		||||
    namespace commands {
 | 
			
		||||
        extern map<string, cellar::commands::CommandFunction> bottles_commands();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // __BOTTLES_HPP
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										24
									
								
								include/dll.hpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								include/dll.hpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
#if defined _WIN32 || defined __CYGWIN__
 | 
			
		||||
  #ifdef BUILDING_DLL
 | 
			
		||||
    #ifdef __GNUC__
 | 
			
		||||
      #define DLL_PUBLIC __attribute__ ((dllexport))
 | 
			
		||||
    #else
 | 
			
		||||
      #define DLL_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
 | 
			
		||||
    #endif
 | 
			
		||||
  #else
 | 
			
		||||
    #ifdef __GNUC__
 | 
			
		||||
      #define DLL_PUBLIC __attribute__ ((dllimport))
 | 
			
		||||
    #else
 | 
			
		||||
      #define DLL_PUBLIC __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
 | 
			
		||||
    #endif
 | 
			
		||||
  #endif
 | 
			
		||||
  #define DLL_LOCAL
 | 
			
		||||
#else
 | 
			
		||||
  #if __GNUC__ >= 4
 | 
			
		||||
    #define DLL_PUBLIC __attribute__ ((visibility ("default")))
 | 
			
		||||
    #define DLL_LOCAL  __attribute__ ((visibility ("hidden")))
 | 
			
		||||
  #else
 | 
			
		||||
    #define DLL_PUBLIC
 | 
			
		||||
    #define DLL_LOCAL
 | 
			
		||||
  #endif
 | 
			
		||||
#endif
 | 
			
		||||
		Reference in New Issue
	
	Block a user