| View previous topic :: View next topic |
| Author |
Message |
Gene Norris Guest
|
Posted: Wed May 02, 2007 12:32 am Post subject: include mylib.lib |
|
|
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
|
Posted: Wed May 02, 2007 12:44 am Post subject: Re: include mylib.lib |
|
|
"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
|
Posted: Wed May 02, 2007 12:55 am Post subject: Re: include mylib.lib |
|
|
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
|
Posted: Wed May 02, 2007 1:12 am Post subject: Re: include mylib.lib |
|
|
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
|
Posted: Wed May 02, 2007 1:21 am Post subject: Re: include mylib.lib |
|
|
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
|
Posted: Wed May 02, 2007 1:33 am Post subject: Re: include mylib.lib |
|
|
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
|
Posted: Wed May 02, 2007 3:14 am Post subject: Re: include mylib.lib |
|
|
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
|
Posted: Thu May 03, 2007 12:19 am Post subject: Re: include mylib.lib |
|
|
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
|
Posted: Thu May 03, 2007 1:59 am Post subject: Re: include mylib.lib |
|
|
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
|
Posted: Thu May 03, 2007 4:25 am Post subject: Re: include mylib.lib |
|
|
"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
|
Posted: Thu May 03, 2007 7:20 am Post subject: Re: include mylib.lib |
|
|
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
|
Posted: Thu May 03, 2007 9:58 pm Post subject: Re: include mylib.lib |
|
|
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
|
Posted: Thu May 03, 2007 10:46 pm Post subject: Re: include mylib.lib |
|
|
"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
|
Posted: Thu May 03, 2007 10:48 pm Post subject: Re: include mylib.lib |
|
|
"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
|
Posted: Fri May 04, 2007 6:51 am Post subject: Re: include mylib.lib |
|
|
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 |
|
 |
|