You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ma...@apache.org on 2015/07/16 15:45:57 UTC

incubator-kylin git commit: ODBC: add compile tutorial

Repository: incubator-kylin
Updated Branches:
  refs/heads/0.8 7ce00974d -> ad7af7c66


ODBC: add compile tutorial


Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/ad7af7c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/ad7af7c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/ad7af7c6

Branch: refs/heads/0.8
Commit: ad7af7c6697a097524efc0372f1a56664004ded7
Parents: 7ce0097
Author: honma <ho...@ebay.com>
Authored: Thu Jul 16 21:45:43 2015 +0800
Committer: honma <ho...@ebay.com>
Committed: Thu Jul 16 21:45:43 2015 +0800

----------------------------------------------------------------------
 odbc/README.md  | 64 +++++++++++++++++++++++++++++-----------------------
 odbc/ReadMe.txt | 53 -------------------------------------------
 2 files changed, 36 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ad7af7c6/odbc/README.md
----------------------------------------------------------------------
diff --git a/odbc/README.md b/odbc/README.md
index b5e5059..e0bc0e2 100644
--- a/odbc/README.md
+++ b/odbc/README.md
@@ -1,29 +1,13 @@
-ODBC
-====
+# Abount KylinODBC
 
-ODBC Driver to interactive with Kylin Engine
 
-Download driver exe at https://github.com/KylinOLAP/odbc-driver/tree/master/exe
+ODBC Driver to interactive with Kylin REST server
 
+The projects is written as a Visual Studio 2012 project. The entry of the project is KylinODBC.sln. Mind the VS version.
 
 
-Folder and their contents are listed. This will give you can an idea of what to find where. More details are available in the CPP files of the respective projects.
+## Contents in the folder
 
-The projects have been built using Visual Studio 2012. The entry of the project is KylinODBC.sln. Mind the VS version.
-
-Make sure you have the following header files, import libraries and DLLs on your system
-1. SQL.H
-2. SQLTYPES.H
-3. SQLEXT.H
-4. ODBCINST.H
-5. ODBC32.LIB & ODBC32.DLL
-6. ODBCCP32.LIB & ODBCCP32.DLL
-
-You can obtain these from Microsoft site as a part of Platform SDK or MDAC kit
-
-
-List of folders and description:
-================================
 
 KylinODBC                  - Root folder containing the workspace. All the projects are part of this single workspace
 
@@ -39,23 +23,47 @@ KylinODBC\Installer(64bit)  - Contains a MSI installer for kylin odbc driver(x64
 
 KylinODBC\doc               - Totorials for ODBC development starters.
 
-How to compile
-================================
-1. Get a windows PC with Microsoft Visual Studio 2012 installed. Additionaly install Microsoft Data Access Components (MDAC, http://www.microsoft.com/en-us/download/details.aspx?id=21995) on it.
+# How to compile
+
+## Development environment
+
+
+* Microsoft Visual Studio 2012 or later
+* Microsoft Windows SDK, if you're running .NET 4, install http://www.microsoft.com/en-us/download/details.aspx?id=8279, if you're running .NET 4.5, install https://msdn.microsoft.com/en-US/windows/desktop/hh852363.aspx
+* Microsoft Data Access Components (MDAC, http://www.microsoft.com/en-us/download/details.aspx?id=21995), this is for getting the odbc header files
+* Install InstallShield, this is for packing ODBC binaries into a windows installer in Visual Studio. Download it free: http://learn.flexerasoftware.com/content/IS-EVAL-InstallShield-Limited-Edition-Visual-Studio?lang=1033&ver=pro
+* Install Visual Leak Detector, this is for detecting memory leaks for Visual C++ programs.Download at: http://vld.codeplex.com/releases
+
 
-2. Download source code for zlib(for compression) and Casablanca(for REST invoking), and build them to static libaries. Remember if you want to build 64 bit odbc driver, you'll have to build 64 bit dependency libaries, the same goes for 32 bit 
+## Build zlib and Casablanca from source code
 
-		Compiling zlib: refer to http://www.helyar.net/2010/compiling-zlib-lib-on-windows/ or http://blog.sina.com.cn/s/blog_6e0693f70100sjgj.html(this doc is in Chineses, but it's quite clear)
+KylinODBC uses zlib for data compression and Casablanca as REST client. KylinODBC requires its libraries to be static libs, so we need to download source codes and compile it manually.  Remember if you want to build 64 bit odbc driver, you'll have to build 64 bit dependency libaries, the same goes for 32 bit. It is recommended that you build Release|x64, Debug|x64, Release|Win32, Debug|Win32 for all the libraries.
+
+### set ZLIB_HOME and CPPREST_HOME
+
+Go to "Control Panel" -> "System" -> "Advanced system settings" -> "Environment Variables" -> "System variables", add two variables "ZLIB_HOME" and "CPPREST_HOME", their value being set to the home directory of zlib and Casablanca.
+
+### compile zlib
+
+Download zlib 1.2.8 source code from its official website: http://www.zlib.net, refer to http://www.helyar.net/2010/compiling-zlib-lib-on-windows/ or http://blog.sina.com.cn/s/blog_6e0693f70100sjgj.html (this doc is in Chinese, but it's clearer) Notice that actually you only need to compile project "zlibstat"
+
+Here're some tips when compiling zlib:
+ 	
+ *  To avoid issue like http://stackoverflow.com/questions/20021950/def-file-syntax-error-in-visual-studio-2012, change "VERSION 1.2.8" in $ZLIB_HOME/zlibvc.def to "VERSION 1.2"
+ *  Select All Configurations and All Platforms from the drop-downs at the top of the Properties dialog (right click project zlibstat), go to  Configuration Properties -> C/C++ -> Code Generation, change the Runtime Library option to Multi-threaded Debug (/MTd) for the Debug configuration and Multi-threaded (/MT) for the Release configuration.
+
+### compile Casablanca
 		
-		Compliling Casablanca: refer to https://katyscode.wordpress.com/2014/04/01/how-to-statically-link-the-c-rest-sdk-casablanca
+We use Casablanca 2.0.1, like zlib, we need static libs of Casablanca, so again we need to compile it manually. Download 2.0.1 source code from code repository: http://casablanca.codeplex.com/SourceControl/changeset/fa40cc31af293417bb9f25d358a3af576226394a. Refer to https://katyscode.wordpress.com/2014/04/01/how-to-statically-link-the-c-rest-sdk-casablanca to build it.
 
-3. Go to "Control Panel" -> "System" -> "Advanced system settings" -> "Environment Variables" -> "System variables", add two variables "ZLIB_HOME" and "CPPREST_HOME", their value being set to the home directory of zlib and Casablanca.
+### Compile KylinODBC
 
-4. Open KylinODBC.sln, if you're building a 32 bit ODBC driver, set the profile to RELEASE|Win32, build project Installer and find the driver exe at Installer/Express/SingleImage/DiskImages/DISK1. If you're building a 64 bit driver, set the profile to RELEASE|x64, and find the exe at Installer(x64bit)/Express/SingleImage/DiskImages/DISK1.
+Open KylinODBC.sln, if you're building a 32 bit ODBC driver, set the profile to RELEASE|Win32, build project Installer and find the driver exe at Installer/Express/SingleImage/DiskImages/DISK1. If you're building a 64 bit driver, set the profile to RELEASE|x64, and find the exe at Installer(x64bit)/Express/SingleImage/DiskImages/DISK1.
 
 
 
 all the best
 
 Hongbin Ma
+
 mahongbin@apache.org

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/ad7af7c6/odbc/ReadMe.txt
----------------------------------------------------------------------
diff --git a/odbc/ReadMe.txt b/odbc/ReadMe.txt
deleted file mode 100644
index e571475..0000000
--- a/odbc/ReadMe.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-
-Folder and their contents are listed. This will give you can an idea of what to find where. More details are available in the CPP files of the respective projects.
-
-The projects have been built using Visual Studio 2012. The entry of the project is KylinODBC.sln. Mind the VS version.
-
-Make sure you have the following header files, import libraries and DLLs on your system
-1. SQL.H
-2. SQLTYPES.H
-3. SQLEXT.H
-4. ODBCINST.H
-5. ODBC32.LIB & ODBC32.DLL
-6. ODBCCP32.LIB & ODBCCP32.DLL
-
-You can obtain these from Microsoft site as a part of Platform SDK or MDAC kit
-
-
-List of folders and description:
-================================
-
-KylinODBC                  - Root folder containing the workspace. All the projects are part of this single workspace
-
-KylinODBC\TestDll         - Contains a simple ODBC client that can be used to test your driver as well as connect to any ODBC data source. 
-
-KylinODBC\Common           - Shared data types, utiliy tools, etc.
-
-KylinODBC\Driver           - Contains code for Kylin ODBC driver. Note that the entire functionality has not been implemented but is enough to get you data into most standard ODBC clients like Tableau, provided you have set up a rest server to serve the query requests. Note that the header file is a very important starting point for understanding this driver.
-
-KylinODBC\Installer  	- Contains a MSI installer for kylin odbc driver(x86)
-
-KylinODBC\Installer(64bit)  - Contains a MSI installer for kylin odbc driver(x64)
-
-KylinODBC\doc               - Totorials for ODBC development starters.
-
-How to compile
-================================
-1. Get a windows PC with Microsoft Visual Studio 2012 installed. Additionaly install Microsoft Data Access Components (MDAC, http://www.microsoft.com/en-us/download/details.aspx?id=21995) on it.
-
-2. Download source code for zlib(for compression) and Casablanca(for REST invoking), and build them to static libaries. Remember if you want to build 64 bit odbc driver, you'll have to build 64 bit dependency libaries, the same goes for 32 bit 
-
-		Compiling zlib: refer to http://www.helyar.net/2010/compiling-zlib-lib-on-windows/ or http://blog.sina.com.cn/s/blog_6e0693f70100sjgj.html(this doc is in Chineses, but it's quite clear)
-		
-		Compliling Casablanca: refer to https://katyscode.wordpress.com/2014/04/01/how-to-statically-link-the-c-rest-sdk-casablanca
-
-3. Go to "Control Panel" -> "System" -> "Advanced system settings" -> "Environment Variables" -> "System variables", add two variables "ZLIB_HOME" and "CPPREST_HOME", their value being set to the home directory of zlib and Casablanca.
-
-4. Open KylinODBC.sln, if you're building a 32 bit ODBC driver, set the profile to RELEASE|Win32, build project Installer and find the driver exe at Installer/Express/SingleImage/DiskImages/DISK1. If you're building a 64 bit driver, set the profile to RELEASE|x64, and find the exe at Installer(x64bit)/Express/SingleImage/DiskImages/DISK1.
-
-
-
-all the best
-
-Hongbin Ma
-mahongbin@apache.org