Message-ID: <001101c0f5c1$084c8660$d822993e@i4n6v6> From: "Enrico Bartky" To: , Subject: DJGPP Date: Fri, 15 Jun 2001 19:31:36 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000E_01C0F5D1.CB0BEBE0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Reply-To: opendos AT delorie DOT com This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C0F5D1.CB0BEBE0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hello, I use DJGPP 2 and try to compile and assmble to object files and = generate the program: test1.S: ... .global _TestFunction .align 4 _TestFunction: pushl %ebp /* some stuff */ ret test2.c extern int TestFunction(int nr1); void main() { ... TestFunction(4711); ... } I compile it: gcc -c test1.S -o test1.o gcc -c test2.c -o test2.o ar rs all.a test1.o test2.o gcc -o testprogram.exe all.a but the link gives a undefined referenced TestFunction(int)! Can you = help me? ------=_NextPart_000_000E_01C0F5D1.CB0BEBE0 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
Hello,
 
I use DJGPP 2 and try to compile and = assmble to=20 object files and generate the program:
 
test1.S:
 
...
.global _TestFunction
.align 4
_TestFunction: pushl %ebp
/* some stuff */
ret
 
 
test2.c
 
extern int TestFunction(int = nr1);
 
void main()
{
  ...
  TestFunction(4711);
  ...
}
 
 
I compile it:
 
gcc -c test1.S -o test1.o
gcc -c test2.c -o test2.o
 
ar rs all.a test1.o = test2.o
 
gcc -o testprogram.exe = all.a
 
but the link gives a = undefined referenced=20 TestFunction(int)! Can you help me?
------=_NextPart_000_000E_01C0F5D1.CB0BEBE0--