Solved

Error compiling C++ on UNIX: Roguewave libraries

Posted on 2003-11-20
3
698 Views
Last Modified: 2012-05-04
I'm trying to compile C++ executable on UNIX using the makefile.  C++is rouguewave compatible so we are using roguewave libraries.

Here's the part of make file that poitnt to the libararies:

RWTAG       = m
RWROOT      = /opt/sourcepro/5_2003/6.2_patch5_32
RWINC       = -D_REENTRANT -mt -D_RWCONFIG=${RWTAG} -I${RWROOT}
RWLIB       = $(RWROOT)/lib
RWLIBS  =      -L$(RWLIB) -lm -ldl -libdbt53-m -libtls77-m
SUNPROLIB   = $(SUNPRO)/lib
SYSLIB      = -lsocket -lnsl
HOMEDIR     = $(HOME)/lib
HOMELIB     = -L$(HOMEDIR) -lcleandb -ldbaccess \
              -lrndcommon -lrndservice
ALL_LIBS    = $(SYSLIB) \
                    $(RWLIBS)

During the compilation I get the following error:

-lsocket -lnsl  -L/opt/sourcepro/5_2003/6.2_patch5_32/lib -lm -ldl -libdbt53-m -libtls77-m -L/home/aserebry/C++/lib -lcleandb -ldbaccess  -lrndcommon -lrndservice
ild: (argument error) can't find library arguments :: -libdbt53-m -libtls77-m

What does this error mean?  Can you please pinpont me why do I ge tthis error.  Do you I have to change something in the makefile or there is problem with the libraries.

Please let me know if you need more info.  
Thaks in advance for your answer.


0
Comment
Question by:ane4ka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
ID: 9790461
>>ild: (argument error) can't find library arguments :: -libdbt53-m -libtls77-m

Are you sure these files exist? According to the naming conventions, I guess the names actually are are libdbt53-m.<ext> and libtls77-m.<ext>, so

RWLIBS  =      -L$(RWLIB) -lm -ldl -libdbt53-m -libtls77-m

should actually read

RWLIBS  =      -L$(RWLIB) -lm -ldl -ldbt53-m -ltls77-m
0
 

Author Comment

by:ane4ka
ID: 9790550
RWLIBS  =      -L$(RWLIB) -lm -ldl -ldbt53-m -ltls77-m

worked.

Thanks for your help!
0
 
LVL 86

Expert Comment

by:jkr
ID: 9790578
You're welcome :o)

As a rule of thumb: The linker aguments have to be of the form -l<archive> with the library being named lib<archive>.a - see tne manpage:

       `-larchive'

       `--library=archive'
           Add archive file archive to the list of files to link.
           This  option  may  be  used any number of times.  `ld'
           will  search  its   path-list   for   occurrences   of
           `libarchive.a' for every archive specified.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question