Makefile issues - fatal error in reader

前端 未结 2 1948
醉梦人生
醉梦人生 2021-01-21 22:11

I am having some issues with a makefile I am creating for a school project. I am compiling and assembling a C file and a SPARC assembly file (respectively) and linking them. I\'

相关标签:
2条回答
  • 2021-01-21 22:31

    As Joachim told you, the lines should be indented by tab, not by spaces, so the second line should look like:

    [TAB]gcc -Wall proj09.driver.o proj09.support.o -o proj09.exe[NEWLINE]
    

    where [TAB] means TAB character.

    Also there shouldn't be any spaces after the command. That's why I've put [NEWLINE] char.

    0 讨论(0)
  • 2021-01-21 22:37

    Aside from the spaces and tabs, this doesn't generate an object file, shouldn't even compile (unless it has main()):

    gcc -Wall proj09.support.s 
    

    You should use -c here too:

    gcc -Wall -c proj09.support.s 
    

    Note: if you're working on Unix/Linux lose the .exe

    0 讨论(0)
提交回复
热议问题