Solved

No Links to Libs

Posted on 1998-06-23
4
174 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Find Visual Studio Tools 2 133
Should CArray be used for a list of pointers in C++? 19 140
Socket Programming (Unix) 8 157
find Speed using GPS latitude & longitude 4 152
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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…
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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

738 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