Solved

No Links to Libs

Posted on 1998-06-23
4
173 Views
Last Modified: 2010-04-01
therefore, I do the following:
tlink abc.obj 123.obj
123 calls other standard C routines and
there is no links to the library functions.
If I have to do a lengthy typing of all the libraries' names on the command line (e.g. tlink 1.obj 2.obj ..... xxx.lib)
It would be tedious and error-prone. How can I link all the libraries without typing the long DOS command?

0
Comment
Question by:whluk
[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
  • 3
4 Comments
 

Author Comment

by:whluk
ID: 1166505
I lost one line of the above question?

The first line should say
'I got an assembly program which calls the C routine'

Sorry if you are confused.

0
 
LVL 22

Accepted Solution

by:
nietod earned 20 total points
ID: 1166506
answer coming.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1166507
For your sanity I would suggest a different approach.  Write an "empty" C++ program whose main() calls your assembly procedure and then that calls back to the C when needed.  This will proably make linking easier, but the real reason I suggest that is that if your program calls C++ code, then the program needs (potentialy) to do some initialization.  The C++ run-time libary needs to be initialized.  If not some of its procedures will fail (you may or may not be using these, but why take the chance.)  Also if your C++ procedure has any static variables or accesses global variables, these need to be initialized.  You can potentially do these initializations from assembly, but it is a lot easier to let C++ do it for you.

Does that sound like a better approach?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1166508
By the way.  If you want to go with your original approach.  The easiest way is to use a batch file.  But the more typical way is to use a make file.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
returning a dereferenced pts in C++ 10 166
Better understanding on C++ Class serialization and formats 9 85
C++ mouse_event mouse look 7 111
designing in object programming 12 104
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

740 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