Note that there are some explanatory texts on larger screens.

plurals
  1. POwhat's wrong with my makefile?
    text
    copied!<p>I have this project that that I compile with the following command:</p> <pre><code>g++ ALE.cpp -lncurses </code></pre> <p>This gives me a.out file. I have the following Makefile but it seems to not be edited correctly.</p> <pre><code>HEADERS = LinkedListNode.h LinkedList.h Classes.h GUI.h Functions.h default: ale ale.o: ALE.cpp $(HEADERS) g++ -c ALE.cpp -o ale.o -lncurses ale: ale.o g++ ale.o -o ale clean: -rm -f ale.o -rm -f ale </code></pre> <p>Errors I get:</p> <pre><code>g++ ale.o -o ale ale.o: In function `_start': (.text+0x0): multiple definition of `_start' /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o:(.text+0x0): first defined here ale.o:(.rodata+0x0): multiple definition of `_fp_hw' /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o:(.rodata+0x0): first defined here ale.o: In function `_fini': /build/buildd/glibc-2.8~20080505/build-tree/glibc-20080505/csu/../sysdeps/generic/initfini.c:109: multiple definition of `_fini' /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crti.o:/build/buildd/glibc-2.8~20080505/build-tree/glibc-20080505/csu/../sysdeps/generic/initfini.c:109: first defined here ale.o:(.rodata+0x4): multiple definition of `_IO_stdin_used' /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o:(.rodata.cst4+0x0): first defined here ale.o: In function `__data_start': (.data+0x0): multiple definition of `__data_start' /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o:(.data+0x0): first defined here ale.o: In function `__data_start': (.data+0x4): multiple definition of `__dso_handle' /usr/lib/gcc/i486-linux-gnu/4.3.2/crtbegin.o:(.data+0x0): first defined here ale.o: In function `_init': /build/buildd/glibc-2.8~20080505/build-tree/i386-libc/csu/crti.S:15: multiple definition of `_init' /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crti.o:/build/buildd/glibc-2.8~20080505/build-tree/i386-libc/csu/crti.S:15: first defined here /usr/lib/gcc/i486-linux-gnu/4.3.2/crtend.o:(.dtors+0x0): multiple definition of `__DTOR_END__' ale.o:(.dtors+0x4): first defined here /usr/bin/ld: warning: Cannot create .eh_frame_hdr section, --eh-frame-hdr ignored. /usr/bin/ld: error in ale.o(.eh_frame); no .eh_frame_hdr table will be created. collect2: ld returned 1 exit status make: *** [ale] Error 1 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload