C++ Builder 6.0 and sub-20

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
Don
Posts: 7
Joined: Thu Nov 04, 2010 2:15 am

C++ Builder 6.0 and sub-20

Post by Don »

May I use sub-20 with C++ Builder 6.0?

My source code as below
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "libsub.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int bc;
sub_device dev=NULL;
//sub_handle handle=NULL;
AnsiString descr, ver;
char tmp[32];
Edit1->Text="";
dev =sub_find_devices(dev);
if(dev==0)
Edit1->Text="NG";
}

Error Message:
[Linker Error] 'D:\SUB-20\SUB20_TEST\SUB20.LIB' contains invalid OMF record, type 0x21 (possibly COFF)

What am I doing wrong? :cry:

serg
Posts: 143
Joined: Mon Aug 31, 2009 9:17 pm

Re: C++ Builder 6.0 and sub-20

Post by serg »

Use the COFF2OMF utility to convert the sub20.lib to the Borland Builder supported library format

Don
Posts: 7
Joined: Thu Nov 04, 2010 2:15 am

Re: C++ Builder 6.0 and sub-20

Post by Don »

It,s work.Thank you.

Post Reply