BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I add a lib to project in BDS2006?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE)
View previous topic :: View next topic  
Author Message
Kathleen Beaumont
Guest





PostPosted: Wed May 09, 2007 7:50 am    Post subject: How do I add a lib to project in BDS2006? Reply with quote



Actually, I don't remember how I did it in BCB6, either.

I'm trying to add Codebase library c4lib.lib to my project (statically
linked). Here's the code (simple test app):

#include <vcl.h>
#pragma hdrstop

#include "MainFrm.h"
#include "d4all.hpp" // CodeBase

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "JvButtons"
#pragma link "JvExButtons"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::JvHTButton1Click(TObject *Sender)
{
Code4 t_codeBase; // access violation right here
Data4 t_data_age;
String t_file = "AGE.DBF";

t_data_age.open(t_codeBase, t_file.c_str());
try {
if (t_data_age.isValid())
{
MessageDlg("Age.dbf is open",
mtInformation, TMsgDlgButtons() << mbOK, 0);
}
} __finally {
t_data_age.close();
t_codeBase.initUndo();
}
}
//---------------------------------------------------------------------------

Library search path contains:
$(BDS)\..\..\codebase\lib\sa\borb5
$(BDS)\lib\debug

plus inherited values from lower level settings

I *think* the problem has to do with adding the lib to my project. Help!

Thanks,
Kathleen
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed May 09, 2007 8:10 am    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote



"Kathleen Beaumont" <kathbeau2004 (AT) yahoo (DOT) com> wrote in message
news:464136f5$1 (AT) newsgroups (DOT) borland.com...

Quote:
Actually, I don't remember how I did it in BCB6, either.

Use the "Add to Project" menu item, or use the Project Manager.


Gambit
Back to top
Kathleen Beaumont
Guest





PostPosted: Thu May 10, 2007 6:38 am    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote



Remy Lebeau (TeamB) wrote:
Quote:
"Kathleen Beaumont" <kathbeau2004 (AT) yahoo (DOT) com> wrote in message
news:464136f5$1 (AT) newsgroups (DOT) borland.com...

Actually, I don't remember how I did it in BCB6, either.

Use the "Add to Project" menu item, or use the Project Manager.


Gambit


Remy,

When I do this in BCB6, my test app compiles, links and runs, and a
button click event opens and closes a DBF file using Codebase.

When I do this in BDS2006, a page opens in the IDE displaying the lib as
text. The project compiles, links and runs, but the button click raises
an exception on the first line that references a Codebase object.

Does the Codebase lib have to be created specifically for BDS2006?

Thanks for your help,

Kathleen
Back to top
vavan
Guest





PostPosted: Thu May 10, 2007 8:10 am    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

On Tue, 08 May 2007 19:50:33 -0700, Kathleen Beaumont
<kathbeau2004 (AT) yahoo (DOT) com> wrote:

Quote:
I'm trying to add Codebase library c4lib.lib to my project (statically
linked). Here's the code (simple test app):

#pragma comment(lib,"c4lib.lib")

--
Vladimir Ulchenko aka vavan
Back to top
Kathleen Beaumont
Guest





PostPosted: Thu May 10, 2007 5:06 pm    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

vavan wrote:
Quote:
On Tue, 08 May 2007 19:50:33 -0700, Kathleen Beaumont
kathbeau2004 (AT) yahoo (DOT) com> wrote:

I'm trying to add Codebase library c4lib.lib to my project (statically
linked). Here's the code (simple test app):

#pragma comment(lib,"c4lib.lib")

Thanks, vavan, but still no joy.


As I mentioned to Gambit, adding the Codebase library to my project let
me build and run, but the application throws an access violation on the
first line of code that references an object in the Codebase library.

Building this same app in BCB6 builds and runs without error.

So am I missing something fundamental here, such as "You can't use the
Codebase library that works with BCB5 and BCB6 with BDS2006"? Note that
this is just the library of functions; it is not the Codebase components.

Thanks for your help.

Kathleen
Back to top
vavan
Guest





PostPosted: Thu May 10, 2007 5:49 pm    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

On Thu, 10 May 2007 05:06:00 -0700, Kathleen Beaumont
<kathbeau2004 (AT) yahoo (DOT) com> wrote:

Quote:
Thanks, vavan, but still no joy.

As I mentioned to Gambit, adding the Codebase library to my project let

well, I only answered how to link arbitrary lib to your project

Quote:
me build and run, but the application throws an access violation on the
first line of code that references an object in the Codebase library.

since I never used codebase I can only speculate here. perhaps some
aligning issues?

Quote:
Building this same app in BCB6 builds and runs without error.

do you mean you only have single lib file for different bcb versions?

Quote:
So am I missing something fundamental here, such as "You can't use the
Codebase library that works with BCB5 and BCB6 with BDS2006"? Note that
this is just the library of functions; it is not the Codebase components.

if you had the sources of aforementioned lib you could simply rebuilt
it for bcb2006. beware of alignment and enum sizes

--
Vladimir Ulchenko aka vavan
Back to top
Kathleen
Guest





PostPosted: Thu May 10, 2007 6:40 pm    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

vavan wrote:
Quote:
Building this same app in BCB6 builds and runs without error.

do you mean you only have single lib file for different bcb versions?

Yes. It's a third party library, and the vendor does not post a BDS2006
version. The version I have been using with BCB6 was prepared for BCB5.
It works fine.

Quote:
So am I missing something fundamental here, such as "You can't use the
Codebase library that works with BCB5 and BCB6 with BDS2006"? Note that
this is just the library of functions; it is not the Codebase components.


if you had the sources of aforementioned lib you could simply rebuilt
it for bcb2006. beware of alignment and enum sizes


Okay, so if I'm reading your message correctly, then I'm out of luck
until and unless the vendor prepares a BDS version. (Please tell me if
that interpretation is wrong!)

Thanks so much for your help!

Kathleen
Back to top
Craig Farrell
Guest





PostPosted: Thu May 10, 2007 11:24 pm    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

Hi,

Quote:
it for bcb2006. beware of alignment and enum sizes
Okay, so if I'm reading your message correctly, then I'm out of luck

Not with regard to those switches. You can
check in Project Options for those (compare
your BCB6 to BDS2006). But I'd recommend
showing the command line: In BDS2006 turn
ON Tools | Options | Environment Options
| Show Comnmand line. In BCB6, add this
reg entry:
[HKEY_CURRENT_USER\Software\Borland\C++Builder\6.0\Compiling]
"ShowCommandLine"="True"

Then compare all the switches. (you can copy the
lines into notepad.exe to make that easier).
Something else might pop out but especially check -b
(enum size), -a (alignment) and -k (standard stack frames).

BTW, I have used .OBJ's from earlier versions successfully
when it was simple C style functions.

--Craig
Back to top
Antonio Felix
Guest





PostPosted: Fri May 11, 2007 3:23 am    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

Quote:
"Kathleen Beaumont" <kathbeau2004 (AT) yahoo (DOT) com> wrote in message
news:464136f5$1 (AT) newsgroups (DOT) borland.com...

Does the Codebase lib have to be created specifically for BDS2006?


Kathleen,

It's been a long time since my last use of Codebase (version 4 at that
time),
but AFAIR it ships with source code that let's you rebuild the lib.

Check Sequiter's web site for more info

Meanwhile i've cheked the site and they refer C++Builder 2006 support.

HTH
Antonio
Quote:
Thanks for your help,

Kathleen
Back to top
vavan
Guest





PostPosted: Fri May 11, 2007 8:10 am    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

On Thu, 10 May 2007 06:40:10 -0700, Kathleen
<KathleenDELETEb (AT) askDELETEcnet (DOT) org> wrote:

Quote:
Okay, so if I'm reading your message correctly, then I'm out of luck
until and unless the vendor prepares a BDS version. (Please tell me if
that interpretation is wrong!)

first of all try to rebuild your own app with -b option

--
Vladimir Ulchenko aka vavan
Back to top
Kathleen Beaumont
Guest





PostPosted: Sat May 12, 2007 9:52 pm    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

Craig, Antonio, vavan:

Thank you all for helping me. Unfortunately, nothing I tried (and I
tried everything you all suggested) has changed my outcome.

I'm going to post new questions on another thread (because this one
suffers from old age).

BTW, I have BCB6 installed on two computers (two licenses). The one at
work includes the reg entry Craig mentioned:

Quote:
In BCB6, add this
reg entry:
[HKEY_CURRENT_USER\Software\Borland\C++Builder\6.0\Compiling]
"ShowCommandLine"="True"

However, my laptop at home does not have a Compiling folder down the
C++Builder\6.0 path, and there is no mention of "ShowCommandLine"
anywhere in my registry.

I mention this mostly to say that it is the little things that are
making me absolutely insane.

Anyway, thank you again for the help... even if I am not yet solving my
specific problem, I'm learning things I didn't know.

Kathleen
Back to top
Kathleen Beaumont
Guest





PostPosted: Sun May 13, 2007 10:10 pm    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

Antonio Felix wrote:
Quote:
Check Sequiter's web site for more info

Meanwhile i've cheked the site and they refer C++Builder 2006 support.

HTH
Antonio

Antonio,

Can you provide a link to the page where you saw this? I looked here:

http://www.codebase.com/products/windows/

and all I see under "Compilers Supported" is C++ Builder (no version
number).

(I'll have my boss call Sequiter this week to find out if they have a
BDS2006 version available; our license limits who among us is permitted
to annoy the support staff at Sequiter.)

Thanks,
Kathleen
Back to top
Antonio Felix
Guest





PostPosted: Mon May 14, 2007 1:11 pm    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

Quote:

Can you provide a link to the page where you saw this? I looked here:


Hi Kathleen,

It was on the 3rd Party Tools for Codebase, in the
Vcl components

http://www.codebase.com/products/3rdparty/sandage/cbcomps4/

<Quote>
Specifications:
Versions for Delphi 5, 6, 7, 2005 (Win32), 2006 and C++ Builder 5, 6, 2006 included.
</Quote>

So they must supply a Lib version for BDS also.

HTH
Antonio
Back to top
Kathleen
Guest





PostPosted: Mon May 14, 2007 7:12 pm    Post subject: Re: How do I add a lib to project in BDS2006? Reply with quote

This is good news! We're not using the components, just the library of
functions, but this may make the difference.

Thank you, Antonio.

Kathleen

Antonio Felix wrote:
Quote:
Can you provide a link to the page where you saw this? I looked here:



Hi Kathleen,

It was on the 3rd Party Tools for Codebase, in the
Vcl components

http://www.codebase.com/products/3rdparty/sandage/cbcomps4/

Quote
Specifications:
Versions for Delphi 5, 6, 7, 2005 (Win32), 2006 and C++ Builder 5, 6, 2006 included.
/Quote

So they must supply a Lib version for BDS also.

HTH
Antonio
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.