Compilation Errors with Borland CBuilder

I have added a display control and an image control to my application’s form (Borland CBuilder 6), now I get two errors:

  1. CBuilder shows me the message The CVimage1CVCError method referenced by CVimage1->OnCVCError has an incompatible parameter list. Remove the reference?
  2. When trying to compile the compiler complains about a duplicate definition of ERRORTIMEOUT.

Hi @GaunterODim,

Both issues have a similar origin: I guess you imported the Common Vision Blox ActiveX controls through the development environment (Component - Import ActiveX Control) rather than through the wrapper package that came with Common Vision Blox.

As CBuilder is unable to properly process the signature of CVCError on its own it’ll instead offer to remove the function entirely - which explains your problem number 1. Problem number 2 is caused by the CBuilder defining the symbol ERRORTIMEOUT somewhere in its headers - leading to a conflict with the automatically generated wrapper for the Common Vision Blox image control.

Both can be avoided by using the package installed to the directory %CVB%\Lib\C\Packages (if there is nothing in this directory or if this directory does not exist you might have installed a runtime-only setup of Common Vision Blox).

To fix this, you should first of all remove the imported/generated Common Vision Blox control wrapper files from your CBuilder\Imports directory. Then open the file CVB_CBuilder6.bpk from the %CVB%\Lib\C\Packages directory. If you want, remove any controls you won’t need, then hit Compile and afterwards Install. This will install the newly generated wrappers and make the control available in the CBuilder tool bar.

Before using them, make sure that your library path (Tools - Environment Options… - Library) contains the folder $(CVB)\Lib\C.