I dont understand what is wrong can someone help? Im Using a school test website to see if my code is working and the code has all the requirments that is included in the instruction I get this message:
This is a test:
cmake:-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: .build
OK
===================================
make: FAIL
Scanning dependencies of target task_4
[ 10%] Building C object CMakeFiles/task_4.dir/task_4.c.o
.task_4.c: In function 'main':
.task_4.c:9:24: warning: implicit declaration of function 'strtod' [-Wimplicit-function-declaration]
double value = strtod(argv[i], NULL);
^~~~~~
[ 20%] Building C object CMakeFiles/task_4.dir/double_stack_array.c.o
[ 30%] Linking C executable task_4
CMakeFiles/task_4.dir/task_4.c.o: In function `main':
.task_4.c:5: undefined reference to `create_stack'
.task_4.c:10: undefined reference to `push'
.task_4.c:19: undefined reference to `pop'
.task_4.c:29: undefined reference to `free_stack'
collect2: error: ld returned 1 exit status
CMakeFiles/task_4.dir/build.make:120: recipe for target 'task_4' failed
make[2]: *** [task_4] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/task_4.dir/all' failed
make[1]: *** [CMakeFiles/task_4.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I dont get what to do!
New contributor
tea brother is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1