[prog] error: "reference 'main' can not be resolved"

Gareth Anderson Gareth.Anderson at acslink.net.au
Wed Nov 9 17:15:18 EST 2005


Hmm, I think I'll chip in my 2cents too :)
I just finished studying Programming languages and implementation and am
still unsure as to where the error would occur.

Here are the relevant lectures (warning large - ~1meg or so)
http://www.csse.monash.edu.au/courseware/cse3322/2005/04imp/lectImpX4.pdf

I was originally thinking that the compiler might get the error message
during the "semantic analysis" which checks the semantics of the code and
gives them values. However this doesn't make sense as you compile multiple
files with only one having a main so this doesn't seem to work

At the end of compliation stage, target code is generated, I'm not sure if
target code could be generated without a "main" program because this doesn't
make sense in C (does it? its being 2 years :P).

Otherwise the linker might pickup the error, however I'm not sure. If no one
has suggestions I might ask my lecturer this question...

Regards,
Gareth


More information about the Programming mailing list