Article View: de.comp.lang.c++
Article #1026HILFE: Probleme beim Linken mit mit WATCOM
From: Mike Schreier
Date: Mon, 18 Dec 1995 10:04
Date: Mon, 18 Dec 1995 10:04
58 lines
2268 bytes
2268 bytes
Hi,
ich habe einige Probleme beim Konvertieren meiner Programme von Borland C++
nach Watcom C++. Besonders beim Liken von Assembler und C++ Moduln.
Ein Beispiel [tut nichts, zeigt nur das Problem] :
C++ : *********************************************************************
int VT;
extern "C" ASM_Test (void);
void main (void)
{
ASM_Test ();
}
Assembler : ***************************************************************
.386
.model flat
.code
extrn VT:dword ; THIS DOES'NT WORK !!!!!!!!!!!!!!!!!!
; THE LINKER DOES'NT FOUND !!!!!!!!!!!
public ASM_Test_
ASM_Test_ proc
push ecx
push ebp
mov ebp,esp
xor ecx,ecx
inc cx
mov eax,VT
mov esp,ebp
pop ebp
pop ecx
ret
ASM_Test_ endp
end
*******************************************************************************
And that is what happens :
wmake -f d:\watcom\programs\vesa\v16.mk -h -e
wasm test.asm -i=d:\WATCOM\h -mf -5r -w4 -e25 -zq
wpp386 ..\go.cpp -i=d:\WATCOM\h -w4 -e25 -zq -otexan -d2 -5r -bt=dos -mf
wlink d all SYS dos4g op m op c op maxe=25 op q op symf @v16.lk1
file test.obj(test.asm): undefined symbol VT
Error(E42): Last command making (d:\watcom\programs\vesa\v16.exe) returned a bad status
Error(E02): Make execution terminated
Execution complete
NUN das Problem : WARUM FINDET DER LINKER DIE IM C++ MODUL DEKLARIERTE VARIABLE 'VT' IM
ASSEMBLERMODUL NICHT ???????????????? Unter BC funktioniert das ganze!
Wenn jemand Rat weiss, dann immer her damit! Vielen Dank im Voraus!
mis
mis@informatik.tu-chemnitz.de
Technical Details
Message-ID:
<4b3ebt$goc@pyrrhus-f.hrz.tu-chemnitz.de>Path:
arc1-ca.pugleaf.net!news.tu-chemnitz.de!newsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.tu-chemnitz.de!news From: Mike Schreier <mis@informatik.tu-chemnitz.de> Newsgroups: de.comp.lang.c++ Subject: HILFE: Probleme beim Linken mit mit WATCOM Date: 18 Dec 1995 10:04:45 GMT Organization: TU Chemnitz-Zwickau Message-ID: <4b3ebt$goc@pyrrhus-f.hrz.tu-chemnitz.de> NNTP-Posting-Host: dig6.informatik.tu-chemnitz.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.05 9000/710) X-URL: news:de.comp.lang.c++?ALL