Linker returns “relocation has an invalid symbol at symbol index…”

后端 未结 5 1977
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 00:03

I am trying out some code on Ubuntu. I\'m trying to run the following code

#include 
#include 

        
5条回答
  •  情深已故
    2020-12-08 00:25

    I'm not sure about your invalid relocation errors but the obvious thing missing is that you have no main function. You need to define an entry point to your application called main, defined at global scope such as:

    int main()
    {
        // TODO: implementation
    }
    

提交回复
热议问题