вот прога top.cgi.c:
#include <stdio.h>
#include "gd.h"
#include "cgi-lib.h"
#include "html-lib.h"
int main(){
llist entries;
gdImagePtr im;
FILE *pngout, *jpegout;
int black;
int white;
im = gdImageCreate(88, 31);
black = gdImageColorAllocate(im, 0, 0, 0);
white = gdImageColorAllocate(im, 255, 255, 255);
pngout = fopen("test.png", "wb");
gdImagePng(im, pngout);
fclose(pngout);
gdImageDestroy(im);
printf("content-type: text/html \n\n");
if (read_cgi_input(&entries)) {
print_entries(entries);
print_cgi_env();
}
list_clear(&entries);
return 0;
}
делаю make
[root@server cgihtml-1.6]# make
gcc -O2 top.cgi.o cgihtml.a -o top.cgi
top.cgi.o: In function `main':
/var/www/cgi-bin/cgihtml-1.6/top.cgi.c:12: undefined reference to `gdImageCreate'
/var/www/cgi-bin/cgihtml-1.6/top.cgi.c:13: undefined reference to `gdImageColorAllocate'
/var/www/cgi-bin/cgihtml-1.6/top.cgi.c:14: undefined reference to `gdImageColorAllocate'
/var/www/cgi-bin/cgihtml-1.6/top.cgi.c:16: undefined reference to `gdImagePng'
/var/www/cgi-bin/cgihtml-1.6/top.cgi.c:18: undefined reference to `gdImageDestroy'
collect2: ld returned 1 exit status
make: *** [top.cgi] Ошибка 1
[root@server cgihtml-1.6]#
че это такое за "undefined reference to четотам" и как его лечить?
Ответ на:
комментарий
от bigbit

Ответ на:
комментарий
от vilfred

Ответ на:
комментарий
от vilfred

Ответ на:
комментарий
от vilfred

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Похожие темы
- Форум групповое программирование (2008)
- Форум Template в разделяемой библиотеке (2022)
- Форум Lighttpd. Как заставить работать FastCGI? (2007)
- Форум Проблема с boost.python в QT creator (2016)
- Форум кросс-компиляция hello world (2007)
- Форум QT и QTcpServer (2008)
- Форум Ошибки в Qt связаные с Q_OBJECT ... помогите плз!!! (2003)
- Форум Проблема со сборкой шаблонов... (2005)
- Форум Не компилируется OpenGL прога в CLion (2017)
- Форум Проблемы с кросскомпиляцией GCC под MIPS (2024)