Я скопировал файл libcgicc.a в папку/usr/local/lib
и файлы заголово >
Когда я запускаю команду $ g ++ test3.cpp -o test3.cgi -i/usr/include/cgicc -l/usr/local/lib
Я получаю эти ошибки < /p>
Код: Выделить всё
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccFrTkyE.o:test3.cpp:(.text+0x23): undefined reference to `cgicc::Cgicc::Cgicc(cgicc::CgiInput*)'
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccFrTkyE.o:test3.cpp:(.text+0xfb): undefined reference to `cgicc::Cgicc::getElement(std::string const&)'
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccFrTkyE.o:test3.cpp:(.text+0x26f): undefined reference to `cgicc::Cgicc::getElement(std::string const&)'
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccFrTkyE.o:test3.cpp:(.text+0x3e4): undefined reference to `cgicc::Cgicc::~Cgicc()'
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccFrTkyE.o:test3.cpp:(.text+0x472): undefined reference to `cgicc::Cgicc::~Cgicc()'
collect2: error: ld returned 1 exit status
Подробнее здесь: https://stackoverflow.com/questions/794 ... ith-cygwin