From: Eric B. <er...@st...> - 2003-05-31 20:50:58
|
I just installed the MinGW. I'm having a problem while compiling a = small C program that calls an external Assembly Language function. It = seems to compile without any problems in Linux using GCC, but not with = this version. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Session With GCC = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D D:\MinGW\home>gcc lab3.c enc.s C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccI5aaaa.o(.text+0x46f):lab3.c: = undefined reference to `enc' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccuybaaa.o(.text+0x14):fake: = undefined reference to `rValue' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccuybaaa.o(.text+0x1f):fake: = undefined reference to `fopen' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccuybaaa.o(.text+0x30):fake: = undefined reference to `wValue' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccuybaaa.o(.text+0x3b):fake: = undefined reference to `fopen' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccuybaaa.o(.text+0x54):fake: = undefined reference to `getc' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccuybaaa.o(.text+0x73):fake: = undefined reference to `putc' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccuybaaa.o(.text+0x8b):fake: = undefined reference to `fclose' C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccuybaaa.o(.text+0x97):fake: = undefined reference to `fclose' =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D |
From: Benjamin R. <Ben...@ep...> - 2003-06-02 10:33:54
|
Hi Eric, "Eric Bradfield" <er...@st...> writes: > D:\MinGW\home>gcc lab3.c enc.s > [...] > C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccuybaaa.o(.text+0x3b):fake: undefined > reference to `fopen' If you check the runtime library with nm you will find that all the exported functions have an underscore '_' prepended. That's a common way of name-mangling C functions. It looks like your assembly file uses the C runtime but doesn't use this name-mangling convention. Hope this helps, benny |