我正在尝试为 arm ( am-1808 ) 编译libcurl,编译工作正常,但是当我尝试使用 libcurl 构建应用程序时,我遇到了一些错误,这是我遵循的步骤:
1.
./configure --host=arm-none-linux --build=i686-linux CFLAGS='-Os' --disable-ftp --disable-tftp --disable-ldap --disable-telnet --disable-dict --disable-ipv6 --disable-ares --disable-sspi --disable-cookies --disable-crypto-auth --without-libidn --without-ssl --without-zlib --without-libssh2 --without-gnutls --without-nss --without-ca-bundle --enable-smtp
2.
make
3.
sudo make install
到这一步为止一切正常,但现在在编译示例应用程序时出现以下错误:
usama@ubuntu:~/Desktop/smtp$ arm-none-linux-gnueabi-gcc -o email smtp-multi.c -lcurl
smtp-multi.c:27:23: error: curl/curl.h: No such file or directory
smtp-multi.c:77: error: return type is an incomplete type
smtp-multi.c: In function 'tvnow':
smtp-multi.c:81: error: storage size of 'now' isn't known
smtp-multi.c:84: warning: 'return' with a value, in function returning void
smtp-multi.c: At top level:
smtp-multi.c:87: error: parameter 1 ('newer') has incomplete type
smtp-multi.c:87: error: parameter 2 ('older') has incomplete type
smtp-multi.c: In function 'main':
smtp-multi.c:95: error: 'CURL' undeclared (first use in this function)
smtp-multi.c:95: error: (Each undeclared identifier is reported only once
smtp-multi.c:95: error: for each function it appears in.)
smtp-multi.c:95: error: 'curl' undeclared (first use in this function)
smtp-multi.c:96: error: 'CURLM' undeclared (first use in this function)
smtp-multi.c:96: error: 'mcurl' undeclared (first use in this function)
smtp-multi.c:98: error: storage size of 'mp_start' isn't known
smtp-multi.c:105: error: 'CURL_GLOBAL_DEFAULT' undeclared (first use in this function)
smtp-multi.c:115: warning: assignment makes pointer from integer without a cast
smtp-multi.c:120: error: 'CURLOPT_URL' undeclared (first use in this function)
smtp-multi.c:121: error: 'CURLOPT_USERNAME' undeclared (first use in this function)
smtp-multi.c:122: error: 'CURLOPT_PASSWORD' undeclared (first use in this function)
smtp-multi.c:123: error: 'CURLOPT_READFUNCTION' undeclared (first use in this function)
smtp-multi.c:124: error: 'CURLOPT_MAIL_FROM' undeclared (first use in this function)
smtp-multi.c:125: error: 'CURLOPT_MAIL_RCPT' undeclared (first use in this function)
smtp-multi.c:126: error: 'CURLOPT_USE_SSL' undeclared (first use in this function)
smtp-multi.c:126: error: 'CURLUSESSL_ALL' undeclared (first use in this function)
smtp-multi.c:127: error: 'CURLOPT_SSL_VERIFYPEER' undeclared (first use in this function)
smtp-multi.c:128: error: 'CURLOPT_SSL_VERIFYHOST' undeclared (first use in this function)
smtp-multi.c:129: error: 'CURLOPT_READDATA' undeclared (first use in this function)
smtp-multi.c:130: error: 'CURLOPT_VERBOSE' undeclared (first use in this function)
smtp-multi.c:131: error: 'CURLOPT_SSLVERSION' undeclared (first use in this function)
smtp-multi.c:132: error: 'CURLOPT_SSL_SESSIONID_CACHE' undeclared (first use in this function)
smtp-multi.c:142: error: storage size of 'timeout' isn't known
smtp-multi.c:145: error: 'fd_set' undeclared (first use in this function)
smtp-multi.c:145: error: expected ';' before 'fdread'
smtp-multi.c:146: error: expected ';' before 'fdwrite'
smtp-multi.c:147: error: expected ';' before 'fdexcep'
smtp-multi.c:152: error: 'fdread' undeclared (first use in this function)
smtp-multi.c:153: error: 'fdwrite' undeclared (first use in this function)
smtp-multi.c:154: error: 'fdexcep' undeclared (first use in this function)
smtp-multi.c:180: error: invalid use of void expression
smtp-multi.c:180: error: type of formal parameter 1 is incomplete
smtp-multi.c:180: error: type of formal parameter 2 is incomplete
smtp-multi.c:181: warning: incompatible implicit declaration of built-in function 'fprintf'
smtp-multi.c:181: error: 'stderr' undeclared (first use in this function)
可能是我在设置 ./configure 时在配置中做错了什么,知道如何摆脱这些错误吗?
问候
乌萨马