📄 intro.so
字号:
m4_section([Building the C++ API])m4_p([dnlC++ support is built automatically on Windows.])m4_section([Building the Java API])m4_p([dnlJava support is not built automatically. The following instructionsassume that you have installed the Sun Java Development Kit inm4_path(d:\java). Of course, if you installed elsewhere or havedifferent Java software, you will need to adjust the pathnamesaccordingly.])m4_subsection([Building Java with Visual C++ .NET or above])m4_nlistbeginm4_nlist([dnlSet your include directories. Choose m4_italic([Tools -__GT__ Options-__GT__ Projects -__GT__ VC++ Directories]). Under the "Showdirectories for" pull-down, select "Include files". Add the fullpathnames for the m4_path(d:\java\include) andm4_path(d:\java\include\win32) directories. Then click OK. These arethe directories needed when including jni.h.])m4_nlist([dnlSet the executable files directories. Choose m4_italic([Tools -__GT__Options -__GT__ Projects -__GT__ VC++ Directories]). Under the "Showdirectories for" pull-down, select "Executable files". Add the fullpathname for the m4_path(d:\java\bin) directory, then click OK. This isthe directory needed to find javac.])m4_nlist([dnlSet the build type to Release or Debug in the drop-down on the .NETtool bar.])m4_nlist([dnlTo build, right-click on db_java and select Build. This builds theJava support library for m4_db and compiles all the java files,placing the resulting m4_path(db.jar) and m4_path(dbexamples.jar)files in the m4_path(build_windows\Release) orm4_path(build_windows\Debug) subdirectory of m4_db.])m4_nlistendm4_subsection([Building Java with Visual C++ 6.0])m4_nlistbeginm4_nlist([dnlSet the include directories. Choose m4_italic([Tools -__GT__ Options-__GT__ Directories]). Under the "Show directories for" pull-down,select "Include files". Add the full pathnames for them4_path(d:\java\include) and m4_path(d:\java\include\win32) directories.These are the directories needed when including m4_path(jni.h).])m4_nlist([dnlSet the executable files directories. Choose m4_italic([Tools -__GT__Options -__GT__ Directories]). Under the "Show directories for"pull-down, select "Executable files". Add the full pathname for them4_path(d:\java\bin) directory. This is the directory needed to findjavac.])m4_nlist([dnlGo to m4_italic([Build -__GT__ Set Active Configuration]) and selecteither the Debug or Release version of the db_java project. Thenpress OK.])m4_nlist([dnlTo build, select m4_italic([Build -__GT__ Buildlibdb_java[]M4MAJOR[]M4MINOR.dll]). This builds the Java supportlibrary for m4_db and compiles all the java files, placing theresulting m4_path(db.jar) and m4_path(dbexamples.jar) files in them4_path(build_windows\Release) or m4_path(build_windows\Debug)subdirectory of m4_db.])m4_nlistendm4_p([dnlTo run Java code, set your environment variable m4_envvar(CLASSPATH)to include the full pathname of these jar files, and your environmentvariable m4_envvar(PATH) to include the m4_path(build_windows\Release)subdirectory. On Windows, remember that files or directories in them4_envvar(CLASSPATH) and m4_envvar(PATH) variables must be separatedby semicolons (unlike UNIX). Then, try running the following commandas a test:])m4_indent([java db.AccessExample])m4_p([dnlIf you want to run Java code using a Debug build, substitute 'Debug'for 'Release' in the instructions above. Make sure you use the DebugJAR file with the Debug DLL and the Release JAR with the ReleaseDLL.])m4_section([Building the Tcl API])m4_p([dnlTcl support is not built automatically. Seem4_link(M4RELDIR/ref/tcl/intro, Loading m4_db with Tcl) forinformation on sites from which you can download Tcl and which Tclversions are compatible with m4_db. These notes assume that Tcl isinstalled as m4_path(d:\tcl), but you can change that if you want.])m4_p([dnlThe Tcl library must be built as the same build type as the m4_dblibrary (both Release or both Debug). We found that the binaryrelease of Tcl can be used with the Release configuration of m4_db,but you will need to build Tcl from sources for the Debugconfiguration. Before building Tcl, you will need to modify itsmakefile to make sure that you are building a debug version, includingthread support. This is because the set of DLLs linked into the Tclexecutable must match the corresponding set of DLLs used by m4_db.])m4_subsection([Building Tcl with Visual C++ .NET or above])m4_nlistbeginm4_nlist([dnlSet the include directories. Choose m4_italic([Tools -__GT__ Options-__GT__ Projects -__GT__ VC++ Directories]). Under the "Showdirectories for" pull-down, select "Include files". Add the fullpathname for m4_path(d:\tcl\include), then click OK. This is thedirectory that contains m4_path(tcl.h).])m4_nlist([dnlSet the library files directory. Choose m4_italic([Tools -__GT__Options -__GT__ Projects -__GT__ VC++ Directories]). Under the "Showdirectories for" pull-down, select "Library files". Add the fullpathname for the m4_path(d:\tcl\lib) directory, then click OK. This isthe directory needed to findm4_path(tcl[]TCLMAJOR[]TCLMINOR[]TCLDEBUG.lib) (or whatever thelibrary is named in your distribution).])m4_nlist([dnlSet the build type to Release or Debug in the drop-down on the .NETtool bar.])m4_nlist([dnlTo build, right-click on db_tcl and select Build. This builds the Tclsupport library for m4_db, placing the result intom4_path(build_windows\Debug\libdb_tcl[]M4MAJOR[]M4MINOR[]d.dll) orm4_path(build_windows\Release\libdb_tcl[]M4MAJOR[]M4MINOR.dll).])m4_nlistendm4_p([dnlIf you use a version different from Tcl TCLMAJOR.TCLMINOR.x you willneed to change the name of the Tcl library used in the build (forexample, m4_path(tcl[]TCLMAJOR[]TCLMINOR[]TCLDEBUG.lib)) to theappropriate name. To do this, right click on m4_italic(db_tcl), go tom4_italic([Properties -__GT__ Linker -__GT__ Input -__GT__ Additionaldependencies]) and changem4_path(tcl[]TCLMAJOR[]TCLMINOR[]TCLDEBUG.lib) to match the Tclversion you are using.])m4_subsection([Building Tcl with Visual C++ 6.0])m4_nlistbeginm4_nlist([dnlSet the include directories. Choose m4_italic([Tools -__GT__ Options-__GT__ Directories]). Under the "Show directories for" pull-down,select "Include files". Add the full pathname form4_path(d:\tcl\include), then click OK. This is the directory thatcontains m4_path(tcl.h).])m4_nlist([dnlSet the library files directory. Choose m4_italic([Tools -__GT__Options -__GT__ Directories]). Under the "Show directories for"pull-down, select "Library files". Add the full pathname for them4_path(d:\tcl\lib) directory, then click OK. This is the directoryneeded to find m4_path(tcl[]TCLMAJOR[]TCLMINOR[]TCLDEBUG.lib) (orwhatever the library is named in your distribution).])m4_nlist([dnlGo to m4_italic([Build -__GT__ Set Active Configuration]) and selecteither the Debug or Release version of the db_tcl project. Then pressOK.])m4_nlist([dnlTo build, select m4_italic([Build -__GT__ Buildlibdb_tcl[]M4MAJOR[]M4MINOR.dll]). This builds the Tcl supportlibrary for m4_db, placing the result intom4_path(build_windows\Debug\libdb_tcl[]M4MAJOR[]M4MINOR[]d.dll) orm4_path(build_windows\Release\libdb_tcl[]M4MAJOR[]M4MINOR.dll).])m4_nlistendm4_p([dnlIf you use a version different from Tcl TCLMAJOR.TCLMINOR.x you willneed to change the name of the Tcl library used in the build (forexample, m4_path(tcl[]TCLMAJOR[]TCLMINOR[]TCLDEBUG.lib)) to theappropriate name. To do this, choosem4_italic([Project -__GT__ Settings -__GT__ db_tcl])and change the Tcl library listed in the Object/Library modulesm4_path(tcl[]TCLMAJOR[]TCLMINOR[]TCLDEBUG.lib) to match the Tcl versionyou are using.])m4_section([Distributing DLLs])m4_p([dnlWhen distributing applications linked against the DLL (not static)version of the library, the DLL files you need will be found in them4_path(build_windows\Release) subdirectory, orm4_path(build_windows\Debug) if you distribute a debug version. You mayalso need to redistribute DLL files needed for the compiler's runtime.For Visual C++ 6.0, these files are m4_path(msvcrt.dll) andm4_path(msvcp60.dll) if you built with a Release configuration, orm4_path(msvcrtd.dll) and m4_path(msvcp60d.dll) if you are using aDebug configuration. Generally, these runtime DLL files can beinstalled in the same directory that will contain your installed m4_dbDLLs. This directory may need to be added to your System PATHenvironment variable. Check your compiler's license and documentationfor specifics on redistributing runtime DLLs.])m4_page_footer
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -