Change History (4)

comment:1 Changed 5 years ago by Артур Гулецкий (huletski)

Type: ожидается проверкаожидаются исправления

Решение не компилируется, это нужно исправить:

{correct}[2062]$ pwd
/home/hfx/dvl/cpp19/klochko.oleg/cpp2019/klochko.oleg/lab_01/correct
{correct}[2063]$ svn up
Updating '.':
At revision 406.
{correct}[2064]$ svn status
{correct}[2065]$ make
mkdir bin
gcc ./src/io.c -Iinclude -c -Wall -Wextra -Werror -o ./bin/io.o
./src/io.c: In function ‘logDebug’:
./src/io.c:5:14: error: ‘symbol’ undeclared (first use in this function)
    5 |  printf("%c",symbol);
      |              ^~~~~~
./src/io.c:5:14: note: each undeclared identifier is reported only once for each function it appears in
./src/io.c:4:20: error: unused parameter ‘a’ [-Werror=unused-parameter]
    4 | void logDebug(char a) {
      |               ~~~~~^
cc1: all warnings being treated as errors
Makefile:13: recipe for target 'bin/io.o' failed
make: *** [bin/io.o] Error 1

Кроме того, Makefile'ы ваш и Татьяны Якушиной поразительно похожи. Это совпадение? Если нет, то попробуйте написать Makefile с нуля самостоятельно.

comment:2 Changed 5 years ago by Артур Гулецкий (huletski)

Version: 1.02.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 Артур Гулецкий (huletski)

Еще переместите, пожалуйста, папку с решением cpp2019/klochko.oleg/lab_01 в cpp2019/lab_01.

comment:4 Changed 5 years ago by Артур Гулецкий (huletski)

Resolution: задача НЕ сдана
Status: assignedclosed
Note: See TracTickets for help on using tickets.