Mail Archives: djgpp/1998/04/22/16:09:45
tobias AT eunet DOT no (tobias) wrote:
> I am a newbie on c, and was told to get djgpp, wich should be a very
> good freeware program. I didnt even manage to compile hello.cpp.
> It didnt seems like Microcrap and win95 worked very well with djgpp
> and long filenames. After some testing I did manage to compile
> hello.cpp, but when trying to compile a little bigger program (in C),
> I got the following error:
>
>
> D:\project>gcc -o program.exe program.c
> d:/djgpp/lib/crt0.o(.data+0x92):crt0.s: undefined reference to `main'
> d:/djgpp/lib/libc.a(crt1.o)(.text+0x312):crt1.c: undefined reference
> to `main'
>
> What could be wrong now ????
Are you sure that program.c have a correctly declared "main" function? The
linker can't find it.
> Also, There seems to be some many different C styles:
> C
The generic name of the language.
> C++
The generic name of the language, but C++ is a super-set of C.
> ANSI C
C as described by the ANSI, that means standard C. Is the most supported,
normally the packages add more functionallity to the standard. If you really
want to port your program to almost any machine you must follow the standard.
> Visual C
Nah! that is simply a M$ product, not a language. Of course they ship a crap
called MFC (M$ Foundation Classes or something like that) used by the visual
code generator. As this library is propietary code made with it is hard to
compile with other compilers, don't even think about other OSs.
SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013
- Raw text -