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 

include mylib.lib
Goto page 1, 2  Next
 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE)
View previous topic :: View next topic  
Author Message
Gene Norris
Guest





PostPosted: Wed May 02, 2007 12:32 am    Post subject: include mylib.lib Reply with quote



I'm using bcb/bds2006 and win xp

How do I include a library file? The project options don't seem to have
that option?

Help?!
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed May 02, 2007 12:44 am    Post subject: Re: include mylib.lib Reply with quote



"Gene Norris" <genenorris (AT) spotengineering (DOT) com> wrote in message
news:463795c5$1 (AT) newsgroups (DOT) borland.com...

Quote:
How do I include a library file? The project options don't
seem to have that option?

Are you referring to the Project Options dialog? That option was
never in that dialog. There is an "Add to Project" item in the
Project menu instead, as well as in the Project Manager.


Gambit
Back to top
Gene Norris
Guest





PostPosted: Wed May 02, 2007 12:55 am    Post subject: Re: include mylib.lib Reply with quote



That works, Thanks. But I have some legacy code where I have in the
options->linker(ilink32)->Command Line showing (among other things):

$(LIBRARIES) import32.lib mylib.lib cp32mt.lib

but there appears to be no other reference to this and no (gui) way to
remove the lib or add another?

Its in the project.xml:

<property category="win32.*.win32b.ilink32" name="param.libfiles.4"
value="mylib.lib"/>

This must be left from conversion of earlier compiler?

Remy Lebeau (TeamB) wrote:
Quote:
"Gene Norris" <genenorris (AT) spotengineering (DOT) com> wrote in message
news:463795c5$1 (AT) newsgroups (DOT) borland.com...

How do I include a library file? The project options don't
seem to have that option?

Are you referring to the Project Options dialog? That option was
never in that dialog. There is an "Add to Project" item in the
Project menu instead, as well as in the Project Manager.


Gambit


Back to top
Gene Norris
Guest





PostPosted: Wed May 02, 2007 1:12 am    Post subject: Re: include mylib.lib Reply with quote

I take that back, it doesn't work! I get unresolved externals for
everything in the mylib.lib! A tdump show me all the functions are
there?! But they are not being linked!

Remy Lebeau (TeamB) wrote:
Quote:
"Gene Norris" <genenorris (AT) spotengineering (DOT) com> wrote in message
news:463795c5$1 (AT) newsgroups (DOT) borland.com...

How do I include a library file? The project options don't
seem to have that option?

Are you referring to the Project Options dialog? That option was
never in that dialog. There is an "Add to Project" item in the
Project menu instead, as well as in the Project Manager.


Gambit


Back to top
Gene Norris
Guest





PostPosted: Wed May 02, 2007 1:21 am    Post subject: Re: include mylib.lib Reply with quote

I have the option of additional options? I looked up the linker options
in help (HA HA HA HA...) So I went to the command line, and it appears
the only place you can add them is in the command line with the other
libs. And there is no easy way to do that?

Gene Norris wrote:
Quote:
I take that back, it doesn't work! I get unresolved externals for
everything in the mylib.lib! A tdump show me all the functions are
there?! But they are not being linked!

Remy Lebeau (TeamB) wrote:
"Gene Norris" <genenorris (AT) spotengineering (DOT) com> wrote in message
news:463795c5$1 (AT) newsgroups (DOT) borland.com...

How do I include a library file? The project options don't
seem to have that option?

Are you referring to the Project Options dialog? That option was
never in that dialog. There is an "Add to Project" item in the
Project menu instead, as well as in the Project Manager.


Gambit


Back to top
Helmut Giese
Guest





PostPosted: Wed May 02, 2007 1:33 am    Post subject: Re: include mylib.lib Reply with quote

On Tue, 01 May 2007 16:12:53 -0400, Gene Norris
<genenorris (AT) spotengineering (DOT) com> wrote:

Quote:
I take that back, it doesn't work! I get unresolved externals for
everything in the mylib.lib! A tdump show me all the functions are
there?! But they are not being linked!
Hi Gene,

this sounds like it could be a name mangling issue. Is your lib by any
chance just exporting pure C functions and your project is C++?
Then you would have to put the protoypes of these functions in a
wrapper like
#if __cplusplus
extern "C" {
#endif
<your prototypes here>
#if __cplusplus
}
#endif

HTH
Helmut Giese
Back to top
Gene Norris
Guest





PostPosted: Wed May 02, 2007 3:14 am    Post subject: Re: include mylib.lib Reply with quote

No. It was other problems with import. Its all fixed thanks.

..lib is used when added to project (Project->Add to Project...).

Helmut Giese wrote:
Quote:
On Tue, 01 May 2007 16:12:53 -0400, Gene Norris
genenorris (AT) spotengineering (DOT) com> wrote:

I take that back, it doesn't work! I get unresolved externals for
everything in the mylib.lib! A tdump show me all the functions are
there?! But they are not being linked!
Hi Gene,
this sounds like it could be a name mangling issue. Is your lib by any
chance just exporting pure C functions and your project is C++?
Then you would have to put the protoypes of these functions in a
wrapper like
#if __cplusplus
extern "C" {
#endif
<your prototypes here
#if __cplusplus
}
#endif

HTH
Helmut Giese
Back to top
Kathire
Guest





PostPosted: Thu May 03, 2007 12:19 am    Post subject: Re: include mylib.lib Reply with quote

In BDS you need to add the lib file in the Linker->OtherOptions->Additional
Options and set the lib path in the Linker options(or by using add project
item option). I know this is confusing for users migrating from VC++. I have
already added a Feature request (qc#44815).

http://qc.borland.com/wc/qcmain.aspx?d=44815

-Kathire

"Gene Norris" <genenorris (AT) spotengineering (DOT) com> wrote in message
news:463795c5$1 (AT) newsgroups (DOT) borland.com...
Quote:
I'm using bcb/bds2006 and win xp

How do I include a library file? The project options don't seem to have
that option?

Help?!
Back to top
David Dean [CodeGear]
Guest





PostPosted: Thu May 03, 2007 1:59 am    Post subject: Re: include mylib.lib Reply with quote

In article <4638e450$1 (AT) newsgroups (DOT) borland.com>,
"Kathire" <kathire@@-----yahoo-------.com> wrote:

Quote:
In BDS you need to add the lib file in the Linker->OtherOptions->Additional
Options and set the lib path in the Linker options(or by using add project
item option). I know this is confusing for users migrating from VC++. I have
already added a Feature request (qc#44815).

While that should work, isn't it easier to click on the project in
the project manager and choose "add..." and then navigate to the .lib
file? That way the library you are using is visible in the project
manager directly.

--
-David Dean
CodeGear C++ QA Engineer
<http://blogs.codegear.com/ddean/>
Back to top
Kathire
Guest





PostPosted: Thu May 03, 2007 4:25 am    Post subject: Re: include mylib.lib Reply with quote

"David Dean [CodeGear]" wrote in message
Quote:
While that should work, isn't it easier to click on the project in
the project manager and choose "add..." and then navigate to the .lib
file? That way the library you are using is visible in the project
manager directly.

When you add the file directly, are we not giving full lib path to the
project file ? Different developers keep changing the lib locations(of
thirdparty libraries) in different systems. In that case we cannot modify
the project file each time to suit each developer.
Also for various types of builds we cannot selectively use a lib. For
example, I use the same source for build unicode build and ansi build for
the app I'm developing. This app uses wxwidgets and I use different libs for
different builds in that case it makes sense to put the lib file names in
the project options rather than putting it in the project file list.

-Kathire
Back to top
David Dean [CodeGear]
Guest





PostPosted: Thu May 03, 2007 7:20 am    Post subject: Re: include mylib.lib Reply with quote

In article <46391dfb$1 (AT) newsgroups (DOT) borland.com>,
"Kathire" <kathire@@-----yahoo-------.com> wrote:

Quote:
When you add the file directly, are we not giving full lib path to the
project file ? Different developers keep changing the lib locations(of
thirdparty libraries) in different systems. In that case we cannot modify
the project file each time to suit each developer.
Also for various types of builds we cannot selectively use a lib. For
example, I use the same source for build unicode build and ansi build for
the app I'm developing. This app uses wxwidgets and I use different libs for
different builds in that case it makes sense to put the lib file names in
the project options rather than putting it in the project file list.

Excellent feedback. Thank you. I'll add that to the internal report.

--
-David Dean
CodeGear C++ QA Engineer
<http://blogs.codegear.com/ddean/>
Back to top
Gene Norris
Guest





PostPosted: Thu May 03, 2007 9:58 pm    Post subject: Re: include mylib.lib Reply with quote

What option do you actually add? There is no help in help and the
command line version doesn't actually have an option for libs, libs set
in the command line after options...

You should add to the internal report that the documentation needs work,
because that just can't be said enough.

David Dean [CodeGear] wrote:
Quote:
In article <46391dfb$1 (AT) newsgroups (DOT) borland.com>,
"Kathire" <kathire@@-----yahoo-------.com> wrote:

When you add the file directly, are we not giving full lib path to the
project file ? Different developers keep changing the lib locations(of
thirdparty libraries) in different systems. In that case we cannot modify
the project file each time to suit each developer.
Also for various types of builds we cannot selectively use a lib. For
example, I use the same source for build unicode build and ansi build for
the app I'm developing. This app uses wxwidgets and I use different libs for
different builds in that case it makes sense to put the lib file names in
the project options rather than putting it in the project file list.

Excellent feedback. Thank you. I'll add that to the internal report.
Back to top
Kathire
Guest





PostPosted: Thu May 03, 2007 10:46 pm    Post subject: Re: include mylib.lib Reply with quote

"Gene Norris" wrote
Quote:
What option do you actually add? There is no help in help and the command
line version doesn't actually have an option for libs, libs set in the
command line after options...

There is no option. Just add the lib name in the Additional Option edit box.
I know it is confusing.I think if you add any other flag before the lib
names you might get linker warning and the libs wont get linked.

Quote:
You should add to the internal report that the documentation needs work,
because that just can't be said enough.

I think this needs a seperate QC. Please feel free to add one.

-Kathire
Back to top
Kathire
Guest





PostPosted: Thu May 03, 2007 10:48 pm    Post subject: Re: include mylib.lib Reply with quote

"David Dean [CodeGear]" wrote in message
Quote:
I'll add that to the internal report.

Thanks David. That will be a big help.

-Kathire
Back to top
David Dean [CodeGear]
Guest





PostPosted: Fri May 04, 2007 6:51 am    Post subject: Re: include mylib.lib Reply with quote

In article <463a14ab$1 (AT) newsgroups (DOT) borland.com>,
Gene Norris <genenorris (AT) spotengineering (DOT) com> wrote:

Quote:
You should add to the internal report that the documentation needs work,
because that just can't be said enough.

There are already plenty of reports to cover the fact that the
documentation needs work. We're determined to make progress on this
front.

--
-David Dean
CodeGear C++ QA Engineer
<http://blogs.codegear.com/ddean/>
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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.