🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Andrew Wan Thu, 27 Sep 2007 09:47
HELP: assembly & C linking woes....
#220
Author: Andrew Wan
Date: Thu, 27 Sep 2007 09:47
33 lines
2225 bytes
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?
Re: HELP: assembly & C linking woes....
#221
Author: Frank Kotler
Date: Thu, 27 Sep 2007 13:21
19 lines
1791 bytes
Andrew Wan wrote:

...
> extern void ASMClsV();
> 
> Am trying to link using Borland C++


The "++" may be causing the compiler to "decorate" (mutilate) the name. 
I'm not sure of the exact syntax, but try something like:

extern "C" void ASMClsV();

You'll still need to call it "_ASMClsV" in the .asm file.

(dropped c.l.c. from the reply - pretty sure they don't want to hear it :)

Best,
Frank
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads