Solved

Logical Link Error?!

Posted on 1998-06-08
3
209 Views
Last Modified: 2010-04-01
Dear All,
    What are the possible reasons for a module not included in the EXE even though I know I have linked it up using tlink? -> tlink 123.obj 1.obj 2.obj
in this case, 2.obj is not included. (I checked it with a hexeditor)






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
  • 2
3 Comments
 

Author Comment

by:whluk
ID: 1165408
For Supplement for the question above,
      I have linked the program (2.obj) such as
mov ah,4ch
int 21h
 
The hexcode for these two statements are for example
EA 4C
CD 21
And I have linked it up with other modules like this
tlink 123.obj 1.obj 2.obj
After linking, I used hexeditor to view the exe file
and I found that the 2 statements are lost somewhere or even not found in the whole program. when i checked it with td, the instruction for instance was call 0060. but the 0060 address was rubbish or in other words, the 0060 address was pointing to the data segment...
CAn you help?

The best
Jacky


0
 

Author Comment

by:whluk
ID: 1165409
Another Comment,
     The statement call 0060 was a statement pointing to the 2 lost statements.... ie mov ah, 4ch and int 21h

So when i Steped thru call 0060, the content over there was data segment's.



0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1165410
If there are no references to a particular module, then the module will never be loaded. You should put a reference to the symbol by using an extern statement in your other module.

For example, if you created the module with a public symbol (hopefully a function), then you can use

extern void F();

to make a reference to it. Then you need to create a dummy function that makes a call into F:

void Dummy()
{
  F();
}

0

Featured Post

Industry Leaders: 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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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 how to clear a vector as well as how to detect empty vectors in C++.

726 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