Solved

Logical Link Error?!

Posted on 1998-06-08
3
204 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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 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.

864 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

25 Experts available now in Live!

Get 1:1 Help Now