Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Omidiran, Ola" <ola dot omidiran at uk dot fid-intl dot com>
Subject: RE: Problems installing Sybperl module on Windows NT ...
Date: Nov 6 2002 2:43PM

I did manage to get these packages installed afterall. However, I am now
faced with the following errors when I run a Perl script that uses the CTlib

C:\OLA_DB~1\PERLST~1>perl -d
Can't load 'C:\Perl\site\lib/auto/Sybase/CTlib/CTlib.dll' for module
Sybase::CTlib: load_file:The specified module could not
be found at C:\Perl\lib/ line 206.
Compilation failed in require at line 5.
BEGIN failed--compilation aborted at line 5.

B/4 you say ah ha, my PPM output shows I have all the required packages

PPM> query
DBD-CSV          [0.1023 ] DBI driver for CSV files
DBD-ODBC         [0.28   ] ODBC driver for the DBI module.
DBD-Sybase       [0.22   ]
sybperl          [2.11   ] Sybase extensions to Perl

Extracts from the script I am trying to run is as follows:


use strict;

use Sybase::CTlib;    <<<<<<<<<<<<<<<<<<=================not getting past
here !!!

	$ENV{SYBASE} = 'c:\SYBASE1192';

ct_callback(CS_CLIENTMSG_CB, \&msg_cb);
ct_callback(CS_SERVERMSG_CB, "srv_cb");
$uid = 'sybadmin'; $pwd = 'pegasus'; $srv = 'CSO_SYB_KINBANE';

$X=new Sybase::CTlib 'user', 'pwd', 'srv';  
$X = Sybase::CTlib->ct_connect($uid, $pwd, $srv);

$X->ct_execute("select name from master..sysdatabases");

   while(($rc = $X->ct_results($restype)) == CS_SUCCEED) {
        next if($restype == CS_CMD_DONE || $restype == CS_CMD_FAIL ||
                $restype == CS_CMD_SUCCEED);
        if(@names = $X->ct_col_names()) {
             print "@names\n";
        if(@types = $X->ct_col_types()) {
             print "@types\n";
        while(@dat = $X->ct_fetch) {
             print "@dat\n";
    print "End of Result Set\n" if($rc == CS_END_RESULTS);
    print "Error!\n" if($rc == CS_FAIL);
	sub msg_cb {
        my($layer, $origin, $severity, $number, $msg, $osmsg, $dbh) = @_;
	printf STDERR "\nOpen Client Message: (In msg_cb)\n";
        printf STDERR "Message number: LAYER = (%ld) ORIGIN = (%ld) ",
               $layer, $origin;
        printf STDERR "SEVERITY = (%ld) NUMBER = (%ld)\n",
               $severity, $number;
        printf STDERR "Message String: %s\n", $msg;
        if (defined($osmsg)) {
            printf STDERR "Operating System Error: %s\n", $osmsg;
    sub srv_cb {
        my($dbh, $number, $severity, $state, $line, $server,
           $proc, $msg) = @_;

    # If $dbh is defined, then you can set or check attributes
    # in the callback, which can be tested in the main body
    # of the code.

        printf STDERR "\nServer message: (In srv_cb)\n";
        printf STDERR "Message number: %ld, Severity %ld, ",
               $number, $severity;
        printf STDERR "State %ld, Line %ld\n", $state, $line;

        if (defined($server)) {
            printf STDERR "Server '%s'\n", $server;

        if (defined($proc)) {
            printf STDERR " Procedure '%s'\n", $proc;

        printf STDERR "Message String: %s\n", $msg;  CS_SUCCEED;

Can you help please???

-----Original Message-----
From: Michael Peppler []
Sent: 25 October 2002 17:46
To: SybPerl Discussion List
Subject: Re: Problems installing Sybperl module on Windows NT ...

On Fri, 2002-10-25 at 09:36, Omidiran, Ola wrote:
> Hi,
> I have been getting the following errors installing Sybperl on my NT
> machine:
> ke
> Microsoft (R) Program Maintenance Utility   Version 1.50
> Copyright (c) Microsoft Corp 1988-94. All rights reserved.
> cp ..\blib\lib\Sybase\
> AutoSplitting ..\blib\lib\Sybase\ (..\blib\lib\auto\Sybase\DBlib)
>         C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib
> C:\Perl\lib\ExtUtils/xs
> ubpp -prototypes -typemap C:\Perl\lib\ExtUtils\typemap DBlib.xs >
> && C
> :\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib -MExtUtils::Command -e mv
> DBlib.
> xsc DBlib.c
>         cl -c -Ic:\Sybase1192\include -nologo -O1 -MD -DNDEBUG -DWIN32
> -DPE
> -DXS_VERSION=\"2.15\"
>  -IC:\Perl\lib\CORE -DDBLIBVS=1000 -DSYBPLVER=\"2.15\" -DDO_TIE DBlib.c
> The name specified is not recognized as an
> internal or external command, operable program or batch file.
> NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1'
> Stop.

Err - stupid question: do you have the C compiler installed on your

Michael Peppler / / / ZetaTools, Inc /
ZetaTools: Call perl functions as Sybase stored procedures!