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

Sue Stones suzo at spin.net.au
Tue Nov 8 22:19:07 EST 2005


If my understanding is right, by the time the program gets to the loader 
there are no symbolic names left, so I think that if its not the 
compiler that is producing the error then it has to be the linker.  (ie 
its the linker's job to get rid of all symbolic names and turn them into 
addresses).  Again this is a guess, not based on any actual knowledge.

sue

Sue Stones wrote:

> I get messages like that in Java if there is no parameters listed for 
> the main program. (I know you are talking about C here). What is 
> causing the error for you? My supposition is that the error is 
> produced in the compiler before it reaches the linker-loader, but this 
> is just my guess. You could test this by using the -S flag that Mary 
> mentioned and seeing if you still get the error.
>
> sue
>
> Aslı wrote:
>
>> hi,
>> for my system programming course, i'd like to learn whether the 
>> linker or
>> the loader causes this pseudo-error message:
>> " reference 'main' can not be resolved" , and what causes this error.
>>
>> i typed the message and searched google, but could not find anything.
>> thanks in advance..
>>
>> Aslı
>>  
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Programming mailing list
>> Programming at linuxchix.org
>> http://mailman.linuxchix.org/mailman/listinfo/programming
>>  
>>
>
>
> _______________________________________________
> Programming mailing list
> Programming at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/programming
>
>
>
>




More information about the Programming mailing list