From: Axel Freyn <axel-freyn@gmx.de>
To: gcc-help@gcc.gnu.org
Subject: Re: Statically linked shared library
Date: Fri, 13 Mar 2009 17:21:00 -0000 [thread overview]
Message-ID: <20090313172914.GZ10008@NANO-66-21.grenoble.cnrs.fr> (raw)
In-Reply-To: <22478672.post@talk.nabble.com>
Hi,
On Thu, Mar 12, 2009 at 08:39:34AM -0700, Kolesar wrote:
> I try linked shared library, statically, but i get error. Where I made
> mistake? Please help.
>
> Exactly, I want dynamically linked -ldl -lrt -luuid -lm -ldl, and statically
> linked -ldrmod (libdrmod.so)
>
>
> g++ -static -ldl -lrt -luuid -lm -ldl -o
> /home/asimh/my_program/src/.bin/sysnfop1s.so
> -L/home/asimh/my_program/lib/.bin -ldrmod
>
> /usr/bin/ld: cannot find -ldrmod
g++ treats the last parameter as a filename to work on. You passed as
last parameter "-ldrmod", so g++ believes that's a file in the actual
direcory. As this filename as no extension (like .c, .cc,...), g++ does
not try to compile it but passes the filename to the linker ld - which
creates the error message "cannot find -ldrmod": it does not find a file
named "-ldrmod" in the current working directory...
Axel
next prev parent reply other threads:[~2009-03-13 17:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 15:39 Kolesar
2009-03-13 17:21 ` Axel Freyn [this message]
2009-03-14 20:49 ` Michael Haubenwallner
2009-03-16 14:35 ` Kolesar
2009-03-16 15:20 ` Andrew Haley
2009-03-16 18:42 ` Kolesar
2009-03-16 18:48 ` Andrew Haley
2009-04-14 12:32 ` Kolesar
2009-04-14 13:05 ` Andrew Haley
-- strict thread matches above, loose matches on Subject: below --
2009-03-12 15:39 Kolesar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090313172914.GZ10008@NANO-66-21.grenoble.cnrs.fr \
--to=axel-freyn@gmx.de \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).