-
Notifications
You must be signed in to change notification settings - Fork 149
/
INSTALL-win.txt
108 lines (77 loc) · 4.48 KB
/
INSTALL-win.txt
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
You can compile this framework using VC++ or GCC on Windows x86 or x64.
1. Compiling using MS VC++ (one component of Visual Studio).
.\projects\x3c_vc90.sln: VC++ 2008
.\projects\x3c_vc80.sln: VC++ 2005
You'll see core, example and swig packages in the solution file.
The swig package is a optional package, so you can unload projects not needed.
If you need to use python, perl, csharp or java, then install extra softwares
and compile some projects in swig package.
Note: After setting environment variables, you may need to restart Visual Studio.
2. Compiling using MinGW GCC (not need VC++).
First install MinGW-GCC and MSYS on Windows.
GCC: http://tdm-gcc.tdragon.net/download
MSYS: http://www.mingw.org/wiki/MSYS/
Then compile it under MSYS console:
a. `cd' to the directory containing the file of 'Makefile'.
b. Type `make' to compile plugin-projects.
The plugins are outputed to './build/plugins'.
c. If you need to use python, perl, csharp or java, then install extra softwares
and type `make python' or `make all python' to compile swig-projects.
Type 'make all python csharp java perl5' can compile more targets.
d. You can remove the program object files from the source code
directory by typing `make clean' or `make cleanall'.
Type `make python.clean' to clean up the only targets built by 'make python'.
3. Installing some extra softwares for compiling swig-projects (optionally).
swigwin: http://www.swig.org/download.html (required)
Python: http://downloads.activestate.com/ActivePython/releases/
Perl: http://downloads.activestate.com/ActivePerl/releases/
JDK: http://www.oracle.com/technetwork/java/javase/downloads/
4. Environment variables setting for compiling swig-projects (optionally).
Readme about more variables in config.mk: https://github.com/rhcad/x3py/wiki/MakeVars
a. swigwin (required)
SWIG_BIN : Set this to the directory (end with '\') that contains swig.exe.
You can add the directory to the 'PATH' variable instead of setting SWIG_BIN.
Example: D:\swigwin-2.0.4\
b. Python
PYTHON_INCLUDE : Set this to the directory that contains python.h .
PYTHON_LIB : Set this to the python library including path for linking.
PYTHON_LIBFILE : Set this to the python library file name (no extension and path)
for linking using GCC (not used in VS IDE).
PYTHON64_INCLUDE : Like PYTHON_INCLUDE, but for Python x64 edition and used only in VS IDE.
PYTHON64_LIB : Like PYTHON_LIB, but for Python x64 edition and used only in VS IDE.
Example using ActivePython 2.7:
PYTHON_INCLUDE: D:\python27\include
PYTHON_LIB: D:\python27\libs
PYTHON_LIBFILE: python27 (used only in GCC)
c. Perl
PERL5_INCLUDE : Set this to the directory that contains perl.h .
PERL5_LIB : Set this to the Perl library including path for linking.
PERL5_LIBFILE : Set this to the Perl library file name (no extension and path) for linking.
Example using ActivePerl 5.14:
PERL5_INCLUDE: D:\perl\lib\CORE
PERL5_LIB : D:\perl\lib\CORE
PERL5_LIBFILE: perl514
d. Java
JAVA_INCLUDE : Set this to the directory containing jni.h
JAVA64_INCLUDE : Like JAVA_INCLUDE, but for JDK x64 edition and used only in VS IDE.
JAVA_BIN : Set this to the bin directory (end with '\') containing javac.exe
You can add this directory to the 'PATH' variable instead of setting JAVA_BIN.
JAVA64_BIN : Like JAVA_BIN, but for JDK x64 edition and used only in VS IDE.
Example using JDK1.6:
JAVA_INCLUDE: D:\jdk1.6\include
JAVA_BIN: D:\jdk1.6\bin\
e. C# (csharp)
CSC_BIN : Set this to the bin directory (end with '\') containing csc.exe. It's used only in GCC.
Example: C:\Windows\Microsoft.NET\Framework\v3.5\
5. Running and testing after compiling.
Run consoledemo.exe or csharp/testplsimple.exe under console.
Run test*.py in 'build/python' directory or type 'python testplsimple.py' under console or IDLE.
Run test*.pl in 'build/perl' directory or type 'perl testplsimple.pl' under console.
Run test*.java in 'build/java' directory or type 'java ./plsimple.jar:. testplsimple' under console.
Debugging swig-project in VC++:
a. Set swig-project as startup project.
b. Set swig-project's debugging properties:
Command: $(PYTHON_LIB)\..\python.exe
Command Arguments: $(TargetDir)..\test$(ProjectName).py
Working Directory: $(TargetDir)..
c. Start debugging, then you may see "python.exe: has exited with code 0" when no error occurs.