You are not logged in Log in Join
You are here: Home » Members » isalsberg » How-to y proyecto para compilar ZInformixDA » How to compile/link ZInformixDA on win32 using MS VC 6.0

Log in
Name

Password

 

How to compile/link ZInformixDA on win32 using MS VC 6.0

How to compile/link ZInformixDA on win32 using MS VC 6.0

Created by isalsberg

In order to use the Informix Database Adapter developed by Mark Rees, under WinNT or Win2000, then You also need the informixdb package. If You just want to download the informixdb-1.3 DLL, and use it along with ZInformixDA, get it from this zip file.

If You need to compile de informixdb package and install ZInformixDA for Windows environment then this How-To may help.

  1. Download the following packages:
  2. You need to:
    • Decompress the "informixdb 1.3" into temporary area. This will generate the ext directory which has the "_informixdb.ec" (Informix embedded), "dbi.c" and The "dbi.h" files needed to compile the module.
    • Install the python package.
    • Install the Client SDK bundle from Informix
  3. Expand the "BuildInformixDB.zip" file, go the MSVC6\informixdb directory and double click the "informixdb.dsw" file to start MSVC++.
  4. Notes:

    • The files under the "src" project directory were got from the informixdb-1.3.tar.gz file, so if You are using a different informixdb version, You'd better get them from the soruce tar ball corresponding to that version.
    • To get the _informixdb.c file from _informixdb.ec, open a DOS window, go where the embedded file is and type esql -p _informixdb.ec
    • If You want to use the batch version, go to the DOS\src directory, edit the file compile.bat, fix the paths to Python and Informix, and then run it. This will generate the dll extension. Do not worry if the batch and the IDE dll's have different size, they both work.

  5. Open the "Tools->Options" menu. Select the "Directories" Tab and:
    • Select in the drop down list "Show directories for" Include Files and add:
      • path to the Python include files (the Include directory beneath You have installed python152 for Win32).
      • path to the Informix include files (the Include directory beneath You have installed SDK for Win32).

      Move this two directories to the top of the "Directories" window using the arrows to set them as the first include option.

    • Select now Library files and add:
      • path to python15.lib
      • path to isqlt09a.lib

  6. Open the "Project->Settings" menu. Select the "Link" Tab, and at the end of the "Object/library modules" text box add: isqlt09a.lib
  7. Build it. This will create the library "_informixdb.dll" under the Release directory.
  8. Now install the ZInformixDA product. To do so:
    • Untar ZInformixDA-0.2.tar.gz under the Zope's HOME directory. This will generate ZInformixDA under <Zope_HOME>\lib\python\Products.
    • Go to <Zope_HOME>\lib\python\Products\ZInformixDA directory and copy there the files:
      • _informixda.dll
      • informixdb.py (comes with the informixdb module)
  9. From the programs group "INFORMIX Client-SDK 2.60" start "Setnet32" and add:
    • Host Information
    • Server Information
    • Environment: set Value to INFORMIXSERVER
  10. Then, from the same program group run "DBPing" just to be shure that You can connect to the server.
  11. Restart Zope by double clicking (see the note below) <Zope_HOME>/start.bat, and add the new "ZInformix DA Connection".
  12. Note: If You are using Zope as an NT service, then the new connection may not work. This is because when Zope is started as service, it tries to establish a connection to the Server as a trusted client and with the user SYSTEM (uppercase); and under a Unix box this could not work.

That's it