Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > HELP: assembly & C linking woes....

Reply
Thread Tools

HELP: assembly & C linking woes....

 
 
Andrew Wan
Guest
Posts: n/a
 
      09-27-2007
I am having problems linking an assembly object with my C object
files. Am getting:

Linker Warning: DOSSEG directive ignored in module asm.asm
Linker Error: Undefined symbol _ASMClsV in module main.c
Linker Error: Undefined symbol VADDR in module asm.asm

In my asm.asm file I've got:

DOSSEG
..MODEL huge
..386

..DATA
EXTRN vaddr : word;

..CODE
PUBLIC ASMClsV

ASMClsV PROC Near
;bla bla
ASMClsV EndP

In main.c I've got:

extern void ASMClsV();

Am trying to link using Borland C++ 4.5 since my source files are all
16-bit. I successfully linked the same asm.asm file with a 16-bit
pascal object using Turbo Pascal 7.0. Why can't I link using Borland C+
+ 4.5 to a 16-bit C file?

Also, I used Microsoft Macro Assembler 5. Should I use Turbo Assembler?

 
Reply With Quote
 
 
 
 
jacob navia
Guest
Posts: n/a
 
      09-27-2007
Andrew Wan wrote:
> I am having problems linking an assembly object with my C object
> files. Am getting:
>


> Linker Warning: DOSSEG directive ignored in module asm.asm
> Linker Error: Undefined symbol _ASMClsV in module main.c
> Linker Error: Undefined symbol VADDR in module asm.asm
>


MAYBE the problem is the missing underscores in the asm
program


> In my asm.asm file I've got:
>
> DOSSEG
> .MODEL huge
> .386
>
> .DATA
> EXTRN vaddr : word;


EXTRN _vaddr : word;

add a leading underscore
>
> .CODE
> PUBLIC ASMClsV


Shouldn't that be
PUBLIC _ASMClsV

with the leading _
>
> ASMClsV PROC Near
> ;bla bla
> ASMClsV EndP
>
> In main.c I've got:
>
> extern void ASMClsV();
>
> Am trying to link using Borland C++ 4.5 since my source files are all
> 16-bit. I successfully linked the same asm.asm file with a 16-bit
> pascal object using Turbo Pascal 7.0. Why can't I link using Borland C+
> + 4.5 to a 16-bit C file?
>
> Also, I used Microsoft Macro Assembler 5. Should I use Turbo Assembler?
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assembly's manifest definition does not match the assembly reference. Horatiu Margavan via .NET 247 ASP .Net 0 08-30-2004 04:14 PM
ASP.NET 2.0: What is the namespace and assembly name of generated assembly SA ASP .Net 0 08-09-2004 05:09 PM
Referencing assembly from GAC using @assembly fails Brent ASP .Net 1 01-23-2004 08:23 PM
can a strongly named assembly reference a regular assembly? Prasanna Padmanabhan ASP .Net 1 11-19-2003 06:21 AM
correctly embedding or linking a resource file into an assembly Sanjay Tibrewal ASP .Net 0 11-14-2003 08:32 PM



Advertisments