* Linking
@ 2002-10-11 6:32 Hermione Granger
0 siblings, 0 replies; 3+ messages in thread
From: Hermione Granger @ 2002-10-11 6:32 UTC (permalink / raw)
To: gcc
This is the command I run:
g++ main.o db.o prime.o -o prime -ldb_cxx -lbig_num 2>error
This is what is in the file "error":
db.o: In function `Prime_func::store(unsigned long)':
db.o(.text+0x39): undefined reference to `Dbt::Dbt[in-charge](void*,
unsigned)'
db.o(.text+0x60): undefined reference to `Dbt::Dbt[in-charge](void*,
unsigned)'
db.o(.text+0x8e): undefined reference to `Db::put(DbTxn*, Dbt*, Dbt*,
unsigned)'
db.o(.text+0xa2): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0xad): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0xc0): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0xd6): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o: In function `Prime_func::store_pos()':
db.o(.text+0x11b): undefined reference to `Dbt::Dbt[in-charge](void*,
unsigned)'
db.o(.text+0x135): undefined reference to `Dbt::Dbt[in-charge](void*,
unsigned)'
db.o(.text+0x163): undefined reference to `Db::put(DbTxn*, Dbt*, Dbt*,
unsigned)'
db.o(.text+0x16e): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x179): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x18c): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x1a2): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o: In function `Prime_func::access(unsigned long)':
db.o(.text+0x1f1): undefined reference to `Dbt::Dbt[in-charge](void*,
unsigned)'
db.o(.text+0x1ff): undefined reference to `Dbt::Dbt[in-charge]()'
db.o(.text+0x233): undefined reference to `Db::get(DbTxn*, Dbt*, Dbt*,
unsigned)'
db.o(.text+0x32d): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x33b): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x388): undefined reference to `Dbt::get_data() const'
db.o(.text+0x48a): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x498): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x4b4): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x4d6): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o: In function `Prime_func::access_pos()':
db.o(.text+0x523): undefined reference to `Dbt::Dbt[in-charge](void*,
unsigned)'
db.o(.text+0x52e): undefined reference to `Dbt::Dbt[in-charge]()'
db.o(.text+0x55c): undefined reference to `Db::get(DbTxn*, Dbt*, Dbt*,
unsigned)'
db.o(.text+0x582): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x58d): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x5a1): undefined reference to `Dbt::get_data() const'
db.o(.text+0x5cb): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x5d6): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x5f0): undefined reference to `Dbt::~Dbt [in-charge]()'
db.o(.text+0x606): undefined reference to `Dbt::~Dbt [in-charge]()'
prime.o: In function `Prime_func::Prime_func[not-in-charge](char const*)':
prime.o(.text+0x8b): undefined reference to `Db::Db[in-charge](DbEnv*,
unsigned)'
prime.o(.text+0xc2): undefined reference to `Db::open(char const*, char
const*, DBTYPE, unsigned, int)'
prime.o(.text+0x1fc): undefined reference to `Db::~Db [in-charge]()'
prime.o: In function `Prime_func::Prime_func[in-charge](char const*)':
prime.o(.text+0x26d): undefined reference to `Db::Db[in-charge](DbEnv*,
unsigned)'
prime.o(.text+0x2a4): undefined reference to `Db::open(char const*, char
const*, DBTYPE, unsigned, int)'
prime.o(.text+0x3de): undefined reference to `Db::~Db [in-charge]()'
prime.o: In function `Prime_func::~Prime_func [not-in-charge]()':
prime.o(.text+0x423): undefined reference to `Db::close(unsigned)'
prime.o(.text+0x433): undefined reference to `Db::~Db [in-charge]()'
prime.o: In function `Prime_func::~Prime_func [in-charge]()':
prime.o(.text+0x45f): undefined reference to `Db::close(unsigned)'
prime.o(.text+0x46f): undefined reference to `Db::~Db [in-charge]()'
/usr/lib/libdb_cxx.so: undefined reference to `cerr'
/usr/lib/libdb_cxx.so: undefined reference to `ios::fail(void) const'
/usr/lib/libdb_cxx.so: undefined reference to `ostream::operator<<(char
const *)'
collect2: ld returned 1 exit status
I have rebuilt big_num and db_cxx since I upgraded to gcc version 3.2.
Please tell me what is going on.
thx
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
^ permalink raw reply [flat|nested] 3+ messages in thread
* linking
@ 2000-08-06 11:07 ko
2000-08-06 11:39 ` linking Toon Moene
0 siblings, 1 reply; 3+ messages in thread
From: ko @ 2000-08-06 11:07 UTC (permalink / raw)
To: gcc
I bought a red hat a few weeks ago. I use gcc and g77 as it came from
redhat. I have a problem in linking a simple c routinte to a simple
fortran main routine. I attached these two very short files. I typed
gcc -c intest.c
g77 -c btest.f
g77 -o btest btest.o intest.o
I have error message saying that in Main_ undefined reference to
bt_init_ is . This worked at Sun, RS6000, ALPHA unix. I read info and
man section. I cannot figure out what the cause is. g77 version is
0.5.24 (egcs-2.91.6)and gcc version is egcs 2.91.6. I spent about two
weeks to solve this problem. Thank you for helping me.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linking
2000-08-06 11:07 linking ko
@ 2000-08-06 11:39 ` Toon Moene
0 siblings, 0 replies; 3+ messages in thread
From: Toon Moene @ 2000-08-06 11:39 UTC (permalink / raw)
To: ko; +Cc: gcc
ko wrote:
> I bought a red hat a few weeks ago. I use gcc and g77 as it came from
> redhat. I have a problem in linking a simple c routinte to a simple
> fortran main routine. I attached these two very short files. I typed
> gcc -c intest.c
> g77 -c btest.f
> g77 -o btest btest.o intest.o
> I have error message saying that in Main_ undefined reference to
> bt_init_ is .
Close; the real error message is:
$ g77 ko.f ko.c
/tmp/ccMU89jz.o: In function `MAIN__':
/tmp/ccMU89jz.o(.text+0x6b): undefined reference to `bt_init__'
Note this: ^^
collect2: ld returned 1 exit status
$ g77 -fno-second-underscore ko.f ko.c
works OK.
This is covered by the manual, BTW.
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-10-11 12:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-11 6:32 Linking Hermione Granger
-- strict thread matches above, loose matches on Subject: below --
2000-08-06 11:07 linking ko
2000-08-06 11:39 ` linking Toon Moene
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).