------------ libtest ------------ ./libtcc_test lib_path=.. <string>:11: warning: implicit declaration of function 'printf' <string>:13: warning: implicit declaration of function 'add' ------------ test3 ------------ tcctest.c:1982: warning: implicit declaration of function 'putchar' tcctest.c:2133: warning: implicit declaration of function 'strlen'
Unified · Split
| @@ -39,6 +39,7 @@ int getchar(void); · 38 unmodified lines | ||
| 39 | 39 | char *gets(char *s); |
| 40 | 40 | int ungetc(int c, FILE *stream); |
| 41 | 41 | int fflush(FILE *stream); |
| 42 | +int putchar (int c); | |
| 42 | 43 | |
| 43 | 44 | int printf(const char *format, ...); |
| 44 | 45 | int fprintf(FILE *stream, const char *format, ...); |
| @@ -64,6 +65,7 @@ void *memcpy(void *dest, const void *src, size_t n); · 19 unmodified lines | ||
| 64 | 65 | void *memmove(void *dest, const void *src, size_t n); |
| 65 | 66 | void *memset(void *s, int c, size_t n); |
| 66 | 67 | char *strdup(const char *s); |
| 68 | +size_t strlen(const char *s); | |
| 67 | 69 | |
| 68 | 70 | /* dlfcn.h */ |
| 69 | 71 | #define RTLD_LAZY 0x001 |
| @@ -16,6 +16,8 @@ int add(int a, int b) · 15 unmodified lines | ||
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | char my_program[] = |
| 19 | +"#include <stdio.h> // printf()\n" | |
| 20 | +"extern int add(int a, int b);\n" | |
| 19 | 21 | "int fib(int n)\n" |
| 20 | 22 | "{\n" |
| 21 | 23 | " if (n <= 2)\n" |