Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

/usr/bin/ld: cannot find -lCstd

123 views
Skip to first unread message

TsanChung

unread,
Aug 11, 2008, 4:35:11 PM8/11/08
to
How to fix the following error?

# make
...
g++ -o src/prog ./src/addSrv.o ./src/createClntCert_main.o ./src/
createSupportFile.o ./src/deleteSrv.o ./src/replaceSrv.o ./src/
examineClntCert.o ./src/examineClntCert_main.o ./src/listSrvs.o ./src/
registerSrv.o ./src/registerSrv_main.o ./src/verify.o ./src/
DynamicLibrary.o -L../../open_ssl_lib/openssl-0.9.7m/out/linux -
L../../util_lib/linux -lUtil -lssl -lcrypto -lCstd -lCrun -lsocket -
lnsl -lposix4 -lm -lw -lc -ldl
/usr/bin/ld: cannot find -lCstd
collect2: ld returned 1 exit status

$ g++ -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --
enable-checking=release --with-system-zlib --enable-__cxa_atexit --
disable-libunwind-exceptions --enable-libgcj-multifile --enable-
languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --
disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-
gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)

$ uname -a
Linux tulip 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686
i686 i386 GNU/Linux


Martin Ambuhl

unread,
Aug 11, 2008, 5:57:42 PM8/11/08
to
TsanChung wrote:
> How to fix the following error?

Quite apart from the likelihood that you have a Linux or make problem,
neither of which is topical in comp.lang.c,

> g++ -o src/prog ./src/addSrv.o ./src/createClntCert_main.o ./src/

suggests that you are confused about the programming language you are
using. g++ is a C++ compiler, which compiles a different language from
C, which language is off-topic in comp.lang.c

Paul Pluzhnikov

unread,
Aug 11, 2008, 10:30:55 PM8/11/08
to
TsanChung <tsanchu...@gmail.com> writes:

> How to fix the following error?
>
> # make

Never ever compile anything as root: one day you'll make a mistake,
and will spend hours recovering from it.

> g++ -o src/prog ./src/addSrv.o ./src/createClntCert_main.o ./src/
> createSupportFile.o ./src/deleteSrv.o ./src/replaceSrv.o ./src/
> examineClntCert.o ./src/examineClntCert_main.o ./src/listSrvs.o ./src/
> registerSrv.o ./src/registerSrv_main.o ./src/verify.o ./src/
> DynamicLibrary.o -L../../open_ssl_lib/openssl-0.9.7m/out/linux -
> L../../util_lib/linux -lUtil -lssl -lcrypto -lCstd -lCrun -lsocket -
> lnsl -lposix4 -lm -lw -lc -ldl
> /usr/bin/ld: cannot find -lCstd
> collect2: ld returned 1 exit status

Remove from your link line libraries which do not exist on
your system.

Your command line is copied verbatim from Solaris, except
's/CC/g++/', and it isn't correct on Solaris either (you should
never have had -lCstd and -lCrun on command line to begin with,
and you almost certainly do not want -lw and -lposix4 on any solaris
that is less than 10 years old).

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

0 new messages