IgrikX
09.10.2009, 20:12
Как установить библиотеку в Dev C++. При установке и запуске проекта не компилируется. Выдаёт ошибки.
Компилятор: Default compiler
Выполнение gcc.exe...
gcc.exe "C:\Documents and Settings\Администратор\Рабочий стол\ncurses_programs\basics\hello_world.c" -o "C:\Documents and Settings\Администратор\Рабочий стол\ncurses_programs\basics\hello_world.exe" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x2b):hello_world.c: undefined reference to `initscr'
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x37):hello_world.c: undefined reference to `printw'
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x3c):hello_world.c: undefined reference to `refresh'
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x41):hello_world.c: undefined reference to `stdscr'
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x49):hello_world.c: undefined reference to `wgetch'
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x4e):hello_world.c: undefined reference to `endwin'
collect2: ld returned 1 exit status
Выполнение завершено
Текст программы
#include <curses.h>
int main()
{
initscr(); /* Start curses mode */
printw("Hello World !!!"); /* Print Hello World */
refresh(); /* Print it on to the real screen */
getch(); /* Wait for user input */
endwin(); /* End curses mode */
return 0;
}
Компилятор: Default compiler
Выполнение gcc.exe...
gcc.exe "C:\Documents and Settings\Администратор\Рабочий стол\ncurses_programs\basics\hello_world.c" -o "C:\Documents and Settings\Администратор\Рабочий стол\ncurses_programs\basics\hello_world.exe" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x2b):hello_world.c: undefined reference to `initscr'
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x37):hello_world.c: undefined reference to `printw'
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x3c):hello_world.c: undefined reference to `refresh'
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x41):hello_world.c: undefined reference to `stdscr'
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x49):hello_world.c: undefined reference to `wgetch'
C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccO6baaa.o(.text+0x4e):hello_world.c: undefined reference to `endwin'
collect2: ld returned 1 exit status
Выполнение завершено
Текст программы
#include <curses.h>
int main()
{
initscr(); /* Start curses mode */
printw("Hello World !!!"); /* Print Hello World */
refresh(); /* Print it on to the real screen */
getch(); /* Wait for user input */
endwin(); /* End curses mode */
return 0;
}