在Netbeans中使用CURL库进行C ++

时间:2018-01-23 23:00:25

标签: c++ curl netbeans

我想在C ++中使用这个例子,它使用CURL库中的方法:

CURL *hnd = curl_easy_init();

    curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
    curl_easy_setopt(hnd, CURLOPT_URL, "http://52.85.88.42:8020/WsdTransaction/users/FnLogins/ABC123%7CD927F46D6CDECBC7DADA1638AADE301600%7C1708231456%7C2K501611");

    struct curl_slist *headers = NULL;
    headers = curl_slist_append(headers, "cache-control: no-cache");
    headers = curl_slist_append(headers, "content-type: application/x-www-form-urlencoded");
    curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

    CURLcode ret = curl_easy_perform(hnd);

但是当我想编译时,它会向我发送此错误:

16:15:12 **** Incremental Build of configuration ReleaseSPg7 for project BP_SPg7_Veda ****
Info: Internal Builder is used for build
arm-unknown-linux-gnu-g++ "-LC:\\inSPire\\inSPire/SDK/SDKSPX_2.7.0/lib" "-LC:\\inSPire\\inSPire/EMVL2/EMV2LB_1.0.3z/lib" "-Wl,-rpath-link=C:\\inSPire\\inSPire/SDK\\SDKSPX_2.7.0\\lib" -o main "src\\ConnectFunctions.o" "src\\DatabaseFunctions.o" "src\\DisplayFunctions.o" "src\\DukptFunctions.o" "src\\EmvFunctions.o" "src\\EncryptFunctions.o" "src\\EventFunctions.o" "src\\Fonts\\bdf09x15B.o" "src\\Fonts\\bdf12x18B.o" "src\\Fonts\\bdf15x24B.o" "src\\PostFunctions.o" "src\\StringFunctions.o" "src\\main.o" "src\\trace.o" -lsdkappmgr -lcurl -lsdkwifi -lEMV_L2_LIB_1.0.3z -lrootkeys -lcryptocore -lasymcrypto -ltr34core -lutils -lsdktr34 -lsdkasymcrypto -lconfig -lsdkbeeper -lsdkclcard -lsdkclock -lsdkcommon -lsdkcrypto -lsdkdisplay -lsdkethernet -lsdkevent -lsdkfilesys -lsdkgui -lsdkinput -lsdkled -lsdkmag -lsdkmisc -lsdknetwork -lsdkpinpad -lsdkpower -lsdkscard -lsdkserial -lsdksocket -lsdkssl -lsdktimer -ldevmgr -lFreeTypeLib -lguicore -lpms -lcrypto -ldbus-1 -ldbus-glib-1 -lgio-2.0 -lglib-2.0 -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lsqlite3 -lssl -lwidget -lz 
c:/inspire/inspire/toolchain/tcharm_1.2.0/bin/../lib/gcc/arm-unknown-linux-gnu/4.2.0/../../../../arm-unknown-linux-gnu/bin/ld.exe: ERROR: Source object c:/inspire/inspire/toolchain/tcharm_1.2.0/bin/../arm-unknown-linux-gnu/sys-root/usr/lib/libcurl.so has EABI version 4, but target main has EABI version 0
c:/inspire/inspire/toolchain/tcharm_1.2.0/bin/../lib/gcc/arm-unknown-linux-gnu/4.2.0/../../../../arm-unknown-linux-gnu/bin/ld.exe: failed to merge target specific data of file c:/inspire/inspire/toolchain/tcharm_1.2.0/bin/../arm-unknown-linux-gnu/sys-root/usr/lib/libcurl.so
c:/inspire/inspire/toolchain/tcharm_1.2.0/bin/../lib/gcc/arm-unknown-linux-gnu/4.2.0/../../../../arm-unknown-linux-gnu/bin/ld.exe: main: hidden symbol `__aeabi_dcmpgt' in c:/inspire/inspire/toolchain/tcharm_1.2.0/bin/../lib/gcc/arm-unknown-linux-gnu/4.2.0\libgcc.a(_cmpdf2.o) is referenced by DSO
c:/inspire/inspire/toolchain/tcharm_1.2.0/bin/../lib/gcc/arm-unknown-linux-gnu/4.2.0/../../../../arm-unknown-linux-gnu/bin/ld.exe: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

如何解决出现的多重错误?

0 个答案:

没有答案