Solved

Error compiling C++ on UNIX: Roguewave libraries

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

829 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