fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. void test();
  5.  
  6. void test2() {
  7. test();
  8. }
  9.  
  10. void test(char *msg) {
  11. printf("test called '%s' (%d)\n", msg, strlen(msg));
  12. }
  13.  
  14. int main() {
  15. test2();
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/home/saRL1T/ccdHWs1u.o: In function `test2()':
prog.cpp:(.text+0x1): undefined reference to `test()'
/home/saRL1T/ccdHWs1u.o: In function `main':
prog.cpp:(.text.startup+0x5): undefined reference to `test()'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty