in reply to Re^4: Installation of DBD::Sybase with Strawberry Perl
in thread Installation of DBD::Sybase with Strawberry Perl

<UPDATE> I missed that you had effectively covered most of what I originally wrote in this post.
If libsybct.lib and libsybcs.lib are in the path specified in LIBRARY_PATH then the reason they're not being linked in is that the name specified in the "-l..." switch is incorrect.
If "-lsybct" is not working, try variations like "-llibsybct.lib", "-llibsybct", "-lsybct.lib" ... until you hit the rendition that works.

If libsybct.lib and libsybcs.lib are not in the path specified in LIBRARY_PATH, then add that location to LIBRARY_PATH:
set LIBRARY_PATH=%LIBRARY_PATH%;C:\path\to\libs;C:\path\to_other\libs
AFAICS, the only issue is that there's still one or two libs that aren't being linked in.
Perhaps there's another location that needs to be added to LIBRARY_PATH, or perhaps the wrong filename is being specified.

You can identify those libraries by doing a plain text search of all lib files for the undefined references.
It's a bit of a rough hack, but it has always worked fine for me. Once you've found the lib file that contains the string "ct_options", then you've probably found the lib file that will resolve that symbol.
Similarly, for "ct_cmd_alloc", "ct_config", etc.
My guess would be that there's one lib that resolves the undefined "ct_*" symbols and another that resolves the undefined "cs_*" symbols.
Once you've established the name(s) and location(s) of the relevant lib(s), then you should hopefully have all the info needed for you to fix the problem.


Cheers,
Rob

Replies are listed 'Best First'.
Re^6: Installation of DBD::Sybase with Strawberry Perl
by bliako (Abbot) on Mar 10, 2021 at 09:15 UTC

    Rob, it's a static link: c:\SAP\OCS-16_0\lib\libsybct.lib

      Rob, it's a static link: c:\SAP\OCS-16_0\lib\libsybct.lib

      Yes, I hadn't noticed that.
      So how do we account for the presence of the undefined references, given that the pertinent libs appear to have been linked in ?
      I'm out of touch with considerations about using MSVC-produced libraries (which these apparently are) with MinGW toolchain.

      <AFTERTHOUGHT> Could it be that these '.lib' files are in fact import libs, not static libs ? In that case, they wouldn't resolve those specified "undefined references".

      Cheers,
      Rob