Solved

Error compiling C++ on UNIX: Roguewave libraries

Posted on 2003-11-20
3
694 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
  • 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

773 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