Opened 5 years ago
Closed 5 years ago
#90 closed ожидаются исправления (задача НЕ сдана)
WW #1
Reported by: | klochko.oleg | Owned by: | Артур Гулецкий (huletski) |
---|---|---|---|
Component: | WW_make | Version: | 2.0 |
Keywords: | Cc: |
Description
Change History (4)
comment:1 Changed 5 years ago by
Type: | ожидается проверка → ожидаются исправления |
---|
comment:2 Changed 5 years ago by
Version: | 1.0 → 2.0 |
---|
На этот раз в решении то, что должно собираться, не линкуется, а то, что не должно линковаться, либо собирается, либо не компилируется:
{correct}[2198]$ pwd && svn up && svn status /home/hfx/dvl/cpp19/klochko.oleg/cpp2019/klochko.oleg/lab_01/correct Updating '.': At revision 448. {correct}[2199]$ make mkdir bin gcc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG src/io.c -c -o bin/io.o gcc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG src/algorithm.c -c -o bin/algorithm.o gcc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG src/util.c -c -o bin/util.o gcc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG src/main.c -c -o bin/main.o gcc bin/algorithm.o bin/util.o bin/main.o -o lab bin/algorithm.o: In function `doComputation': algorithm.c:(.text+0x2c): undefined reference to `logDebug' bin/util.o: In function `max': util.c:(.text+0x18): undefined reference to `logDebug' bin/main.o: In function `main': main.c:(.text+0x39): undefined reference to `logDebug' collect2: error: ld returned 1 exit status Makefile:6: recipe for target 'lab' failed make: *** [lab] Error 1 {correct}[2200]$ cd ../ correct/ multiple/ unresolved/ {correct}[2200]$ cd ../multiple/ {multiple}[2201]$ make mkdir bin gcc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG src/io.c -c -o bin/io.o gcc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG src/algorithm.c -c -o bin/algorithm.o gcc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG src/util.c -c -o bin/util.o cc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG -c -o src/main.o src/main.c gcc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG src/main.c -c -o bin/main.o gcc bin/algorithm.o bin/util.o bin/main.o -o lab {multiple}[2202]$ cd ../unresolved/ {unresolved}[2203]$ make mkdir bin gcc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG src/io.c -c -o bin/io.o gcc -Wall -Wextra -Wimplicit -Werror -Iinclude -D NDEBUG src/algorithm.c -c -o bin/algorithm.o src/algorithm.c: In function ‘doComputation’: src/algorithm.c:5:23: error: unused parameter ‘a’ [-Werror=unused-parameter] 5 | int doComputation(int a, float b) { | ~~~~^ src/algorithm.c:5:32: error: unused parameter ‘b’ [-Werror=unused-parameter] 5 | int doComputation(int a, float b) { | ~~~~~~^ cc1: all warnings being treated as errors Makefile:15: recipe for target 'bin/algorithm.o' failed make: *** [bin/algorithm.o] Error 1
Исправляйте.
comment:3 Changed 5 years ago by
Еще переместите, пожалуйста, папку с решением cpp2019/klochko.oleg/lab_01 в cpp2019/lab_01.
comment:4 Changed 5 years ago by
Resolution: | → задача НЕ сдана |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
Решение не компилируется, это нужно исправить:
Кроме того, Makefile'ы ваш и Татьяны Якушиной поразительно похожи. Это совпадение? Если нет, то попробуйте написать Makefile с нуля самостоятельно.