Solved

Error compiling C++ on UNIX: Roguewave libraries

Posted on 2003-11-20
3
692 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
Comment Utility
>>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
Comment Utility
RWLIBS  =      -L$(RWLIB) -lm -ldl -ldbt53-m -ltls77-m

worked.

Thanks for your help!
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
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 video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now