[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-date: Wed Jan 26 13:17:30 2005 -->
- <!--x-from-r13: eqnivf ng cnanfbavpngynagn.pbz (Rnivf, Dvatb Zrfgre) -->
- <!--x-message-id: 28C67C8F8DA9124888FA2620399BCA6A01B7B805@atlexc01.panasonicatlanta.com -->
- <!--x-subject: [ale] help with lib -->
- <li><em>date</em>: Wed Jan 26 13:17:30 2005</li>
- <li><em>from</em>: rdavis at panasonicatlanta.com (Davis, Ringo Lester)</li>
- <li><em>subject</em>: [ale] help with lib</li>
gcc sailor.c navigate.o -o sailor -L/usr/lib/termcap -lncurses
-ltermcap -lm
A combination of using ncurses instead of curses and the
-L/usr/lib/termcap.
But this does not explain why it could not find the termcap lib. Should
there be a path statement in my .bashrc file to tell gcc where the libs
are located?
Ringo
-----Original Message-----
From: ale-bounces at ale.org [<a rel="nofollow" href="mailto:ale-bounces">mailto:ale-bounces</a> at ale.org] On Behalf Of
Davis, Ringo (Lester)
Sent: Wednesday, January 26, 2005 11:11 AM
To: Atlanta Linux Enthusiasts
Subject: RE: [ale] help with lib
Weirder and weirder.
I tried this
gcc sailor.c navigate.o -o sailor -L/usr/lib/curses -L/usr/lib/termcap
-lcurses -ltermcap -lm
because those are the directories the files are in.
It then compiles without errors.
I run the program by going up a directory and typing ./demo.
Demo is the following file
src/sailor < test_worlds/test1
so it runs sailor.exe and takes test1 as its parameter.
But here is the error I get.
./demo: line 1: 8155 Segmentation Fault src/sailor < test_worlds/test1.
I know the program runs on Cygwin, Also if I run the example program
without recompiling it works, but compiling makes it give the above
error, so something is still wrong.
Any ideas?
Thanks
Ringo
-----Original Message-----
From: ale-bounces at ale.org [<a rel="nofollow" href="mailto:ale-bounces">mailto:ale-bounces</a> at ale.org] On Behalf Of
Jason Day
Sent: Wednesday, January 26, 2005 10:55 AM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] help with lib
On Wed, Jan 26, 2005 at 09:17:57AM -0500, ringo davis wrote:
> That fixes the curses err, now it complains about libtermcap (which is
also
> installed).
[snip]
The ldconfig program maintains a cache of shared object files, aka DLLs.
It looks like your program is trying to link to a static library file,
however, not a shared library. So, even though ldconfig knows how to
find libtermcap.so, that doesn't help because your program wants to link
with libtermcap.a. Make sure the link line in your Makefile passes the
library path with the -L option.
For example:
gcc -o foo foo.o bar.o baz.o -ltermcap -L/usr/lib
The -L option tells gcc to look in the /usr/lib directory for .a files.
This of course assumes that libtermcap.a is in fact in /usr/lib.
HTH,
Jason
--
Jason Day jasonday at
<a rel="nofollow" href="http://jasonday.home.att.net">http://jasonday.home.att.net</a> worldnet dot att dot net
"Of course I'm paranoid, everyone is trying to kill me."
-- Weyoun-6, Star Trek: Deep Space 9
_______________________________________________
Ale mailing list
Ale at ale.org
<a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
--Appended by Panasonic Mobile Communications
Development Corporation of U.S.A.-----This e-mail
and any attachments may contain information that is
confidential, proprietary, privileged or otherwise
protected by law. The information is solely intended
for the named addressee (or a person responsible for
delivering it to the addressee). If you are not the
intended recipient of this message, you are not
authorized to read, print, retain, copy or
disseminate this message or any part of it. If you
have received this e-mail in error, please notify
the sender immediately by return e-mail and delete
it from your computer.
--Appended by Panasonic Mobile Communications
Development Corporation of U.S.A.-----This e-mail
and any attachments may contain information that is
confidential, proprietary, privileged or otherwise
protected by law. The information is solely intended
for the named addressee (or a person responsible for
delivering it to the addressee). If you are not the
intended recipient of this message, you are not
authorized to read, print, retain, copy or
disseminate this message or any part of it. If you
have received this e-mail in error, please notify
the sender immediately by return e-mail and delete
it from your computer.
-------------- next part --------------
An HTML attachment was scrubbed...
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg01144.html">[ale] Partimage restore and grub</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg01146.html">[ale] help with lib</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg01126.html">[ale] help with lib</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg01146.html">[ale] help with lib</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#01145"><strong>Date</strong></a></li>
<li><a href="threads.html#01145"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>