Object oriented databae for Python
achrist at easystreet.com
achrist at easystreet.com
Fri Mar 21 12:18:05 EST 2003
achrist at easystreet.com wrote:
>
>
> I expect I'll be trying to re-build this with MSVC++ v6 with
> debugging off in a couple of hours.
>
Here's what I did:
1. Changed makefile.mvc to what shown below
2. Changed Make.Bat to what shown below
3. Changed Compile.Bat in the Python Dir of Dybase to what shown below
I ran Make.Bat and Compile.Bat, and they each appear to work.
I set up and ran a batch file to run the examples (below)
Example Guess.Py gives an error:
Traceback (most recent call last):
File "I:\Python\Lib\site-packages\dybase\python\guess.py", line
6, in ?
import dybase
File "I:\Python\Lib\site-packages\dybase\python\dybase.py",
line 6, in ?
import pythonapi
ImportError: dynamic module does not define init function
(initpythonapi)
Al
----------------New MakeFile.Mvc Follows-----------------------
# -*- makefile -*-
# Makefile for Microsoft Windows with Microsoft Visual C++ 5.0 and
higher compiler
OBJS = btree.obj database.obj dybase.obj file.obj pagepool.obj
INCS = database.h btree.h buffer.h file.h hashtab.h pagepool.h stdtp.h
sync.h ..\inc\dybase.h
DYBASE_LIB = ..\lib\dybase.lib
DYBASE_DLL = ..\lib\dybasedll.dll
CC = cl
COMMON_FLAGS = -I. -GX -I..\inc -c -nologo
CFLAGS = $(COMMON_FLAGS) -W3 -MD
DLLFLAGS = -LD -nologo
LD = $(CC)
LDFLAGS = -MD -nologo
AR = lib
ARFLAGS =
all: $(DYBASE_LIB) $(DYBASE_DLL)
btree.obj: btree.cpp $(INCS)
$(CC) $(CFLAGS) btree.cpp
database.obj: database.cpp $(INCS)
$(CC) $(CFLAGS) database.cpp
file.obj: file.cpp $(INCS)
$(CC) $(CFLAGS) file.cpp
pagepool.obj: pagepool.cpp $(INCS)
$(CC) $(CFLAGS) pagepool.cpp
dybase.obj: dybase.cpp $(INCS)
$(CC) $(CFLAGS) -DDYBASE_DLL dybase.cpp
$(DYBASE_LIB): $(OBJS)
$(AR) $(ARFLAGS) /OUT:$(DYBASE_LIB) $(OBJS)
$(DYBASE_DLL): $(OBJS)
$(CC) $(DLLFLAGS) /Fe$(DYBASE_DLL) $(OBJS)
cleanobj:
-del *.exp,*.obj,*.pch,*.pdb,*.ilk,*.dsp,*.dsw,*.ncb,*.opt
clean: cleanobj
-del $(DYBASE_LIB),$(DYBASE_DLL)
zip: clean
cd ..\..
-del dybase.zip
zip -r dybase.zip dybase
--------------------------------------------------------
---------------------New Make.Bat-----------------------
set path=D:\Msvc\Bin;%PATH%
set include=D:\Msvc\Include;%path;
nmake -f makefile.mvc %1 %2 %3 %4 %5 %6 %7 %8 %9
-----------------------------------------------------------
----New Compile.Bat (There are just 2 lines, ignore wrap --
set PYTHON_HOME=I:\Python
cl -MD -GX -LD -I%PYTHON_HOME%\Include -I..\inc -Fepythonapi.dll
pythonapi.c ..\lib\dybasedll.lib %PYTHON_HOME%\libs\python22.lib
-------------------------------------------------------
----------------RunExamples.Bat -----------------------
Set Path=I:\Python\Lib\Site-Packages\Dybase\Lib;%Path%
Guess.Py
Pause
TestIndex.Py
Pause
TestLink.Py
Pause
More information about the Python-list
mailing list