Support Note
Problem with Borland C++Builder
|
|
|
Question: I have a program that is written using Borland C++Builder
and uses CANLIB. It works flawlessly on one machine here, but when I
move it to another machine with new CAN drivers, it fails
mysteriously. Why?
|
|
Answer: Some releases of CANLIB SDK (those prior to 2.29, and also 3.7) shipped an import
library for Borland linkers (canlib32.lib) which specified "import by
ordinal" instead of "import by name". The latter is the
preferred Win32 way of doing things. The result is that if you have an
application linked using an import library from one of these versions of the
SDK, your
application will try to link to the functions in canlib32.dll using their
ordinal number. Newer versions of canlib32.dll, however, have more entry
points than the older versions, and your application will fail.
Typical symptoms are that all calls to CANLIB API functions return with
an error code stating that CANLIB has not been initialized. This problem
only occurs with programs developed with Borland's C++ tools. Other
compilers are not affected.
|
|
|
Workaround: Put an old version of canlib32.dll (one that you know works with
your application) in the same directory as your application.
|
|
|
Solution: Relink your application using the import libraries from CANLIB SDK 2.29 or
later (but not 3.7). The import
library for Borland compilers now specifies "import by name" so the
application will work with all known releases of the drivers.
|
|
|
Contact our Support Team. Back to
Support Notes Index >> |