Main Page | Report this Page
Computers Forum Index  »  Computer Compilers - LCC  »  Am I doing something wrong? Just trying to compile a...
Page 1 of 1    

Am I doing something wrong? Just trying to compile a...

Author Message
James Russell...
Posted: Tue Oct 27, 2009 12:29 pm
Guest
Hi, I've just installed the latest version of LCC in a Windows
environment.

The code I'm testing is the following:

#include <stdio.h>

int main(int argc, char *argv[]) {
printf("\n Hello World!\n");
}

Building from a command line (lcc.exe hello.c -o hello.exe) generates
an
executable file, 1 KB size, which does nothing...

Building from Wedit gives the following errors:

c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to
'_RtlUnwind at (no spam) 16'
c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to '_signal'
c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to '_raise'
c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to '_exit'
asctoq.obj .text: undefined reference to '_strnicmp'
defaulttrap.obj .text: undefined reference to '_fwrite'
defaulttrap.obj .text: undefined reference to '_itoa'
defaulttrap.obj .text: undefined reference to '_strcat'
defaulttrap.obj .text: undefined reference to '_abort'
powlasm.obj .text: undefined reference to '_pow'
qfloat.obj .text: undefined reference to '_memset'
qfloat.obj .text: undefined reference to '_strchr'
qfloat.obj .text: undefined reference to '_memmove'
strlcpy.obj .text: undefined reference to '_memcpy'
xprintf.obj .text: undefined reference to '_localeconv'
xprintf.obj .text: undefined reference to '_strtol'
xprintf.obj .text: undefined reference to '_wcslen'
xprintf.obj .text: undefined reference to '_wctomb'
xprintf.obj .text: undefined reference to '_fputc'

Am I doing something wrong? Is there something not well configurated?

Thanks for everything.
 
James Russell...
Posted: Tue Oct 27, 2009 3:41 pm
Guest
On Oct 27, 3:28 pm, jacob navia <ja... at (no spam) nospam.org> wrote:
Quote:
James Russell a écrit :



Hi, I've just installed the latest version of LCC in a Windows
environment.

The code I'm testing is the following:

#include <stdio.h

int main(int argc, char *argv[]) {
   printf("\n  Hello World!\n");
}

Building from a command line (lcc.exe hello.c -o hello.exe) generates
an
executable file, 1 KB size, which does nothing...

Building from Wedit gives the following errors:

c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to
'_RtlUnwind at (no spam) 16'
c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to '_signal'
c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to '_raise'
c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to '_exit'
asctoq.obj .text: undefined reference to '_strnicmp'
defaulttrap.obj .text: undefined reference to '_fwrite'
defaulttrap.obj .text: undefined reference to '_itoa'
defaulttrap.obj .text: undefined reference to '_strcat'
defaulttrap.obj .text: undefined reference to '_abort'
powlasm.obj .text: undefined reference to '_pow'
qfloat.obj .text: undefined reference to '_memset'
qfloat.obj .text: undefined reference to '_strchr'
qfloat.obj .text: undefined reference to '_memmove'
strlcpy.obj .text: undefined reference to '_memcpy'
xprintf.obj .text: undefined reference to '_localeconv'
xprintf.obj .text: undefined reference to '_strtol'
xprintf.obj .text: undefined reference to '_wcslen'
xprintf.obj .text: undefined reference to '_wctomb'
xprintf.obj .text: undefined reference to '_fputc'

Am I doing something wrong? Is there something not well configurated?

Thanks for everything.

Lcc.exe does only the compiler, you need to link afterwards. The best
solution is to write:

lc hello.c

the "lc.exe" program will call lcc.exe and if compilation goes OK it will call
the linker.

The errors I posted corresponded to the linker output, when linking
the linker returns with code 53 and prints all of the errors. Is there
a problem in the C library?

Thanks anyway.
 
jacob navia...
Posted: Tue Oct 27, 2009 6:28 pm
Guest
James Russell a écrit :
Quote:
Hi, I've just installed the latest version of LCC in a Windows
environment.

The code I'm testing is the following:

#include <stdio.h

int main(int argc, char *argv[]) {
printf("\n Hello World!\n");
}

Building from a command line (lcc.exe hello.c -o hello.exe) generates
an
executable file, 1 KB size, which does nothing...

Building from Wedit gives the following errors:

c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to
'_RtlUnwind at (no spam) 16'
c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to '_signal'
c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to '_raise'
c:\tools\lcc\lib\lcccrt0.obj .text: undefined reference to '_exit'
asctoq.obj .text: undefined reference to '_strnicmp'
defaulttrap.obj .text: undefined reference to '_fwrite'
defaulttrap.obj .text: undefined reference to '_itoa'
defaulttrap.obj .text: undefined reference to '_strcat'
defaulttrap.obj .text: undefined reference to '_abort'
powlasm.obj .text: undefined reference to '_pow'
qfloat.obj .text: undefined reference to '_memset'
qfloat.obj .text: undefined reference to '_strchr'
qfloat.obj .text: undefined reference to '_memmove'
strlcpy.obj .text: undefined reference to '_memcpy'
xprintf.obj .text: undefined reference to '_localeconv'
xprintf.obj .text: undefined reference to '_strtol'
xprintf.obj .text: undefined reference to '_wcslen'
xprintf.obj .text: undefined reference to '_wctomb'
xprintf.obj .text: undefined reference to '_fputc'

Am I doing something wrong? Is there something not well configurated?

Thanks for everything.

Lcc.exe does only the compiler, you need to link afterwards. The best
solution is to write:

lc hello.c

the "lc.exe" program will call lcc.exe and if compilation goes OK it will call
the linker.
 
bartc...
Posted: Thu Nov 05, 2009 5:48 am
Guest
"James Russell" <j.russel.moore at (no spam) gmail.com> wrote in message
news:29ff4642-184f-414d-a7ae-28670a8eb18d at (no spam) g23g2000yqh.googlegroups.com...
Quote:
Hi, I've just installed the latest version of LCC in a Windows
environment.

The code I'm testing is the following:

#include <stdio.h

int main(int argc, char *argv[]) {
printf("\n Hello World!\n");
}

Building from a command line (lcc.exe hello.c -o hello.exe) generates
an
executable file, 1 KB size, which does nothing...

lcc.exe generates a .obj output file, hello.obj for this example. You've
told it here to call that hello.exe. You then try and run that .exe which is
really a .obj file...

Try:

lcc hello.c
lcclnk hello.obj

Or this:

lc hello.c

as was suggested.

Quote:

Building from Wedit gives the following errors:

I once had weird problems like this, although not from wedit. It turned out
I had a foreign stdio.h (or some such file) not belonging to lccwin in the
development directory.

Start a new, empty directory. Copy only hello.c into it, run those commands
above. If it doesn't work, try copying/reinstalling lcc to C:\lcc, (setting
a path to c:\lcc\bin,) and trying again.

--
Bartc
 
 
Page 1 of 1    
All times are GMT
The time now is Sat Nov 28, 2009 6:26 am