2009-07-22 10 views
4

私の最初の質問。私はそれもリンクされていない。私はWindows XPとVisual C++ 2008 Express Editionを使用しています。だからここリンクlibcURLはここに2008 Expressの

は私がやったことです:

  1. ダウンロードlibcURLは:VC++
  2. でcurl-7.19.5-devel-mingw32.zip
  3. オープンの新しいコマンドラインプロジェクトは、フォルダ 'libに' と 'を含めます私の新しいプロジェクトに含めることができますが、私はしばらく時間がかかりました。
  4. プロパティ - > C/C++ - >一般:追加するフォルダに「インクルード」を追加するには
  5. プロパティ - リンカ - >一般:追加されたフォルダ 'lib'を '追加ライブラリのあるすべてのフォルダ '
  6. プロパティ - >リンカ - >入力:追加の依存関係を追加しました。libcurl.a libcrypto.a libeay32.a libssh2.a libssh2dll.a libssl32.a libssl.a libz.a libzdll。 WS2_32.LIB wldap32.libプロパティ - > C/C++での
  7. - >プリプロセッサ: 'CURL_STATICLIB'
  8. 私は未確認の 'プリコンパイル済みヘッダー' を追加しました定義と 'マルチスレッド・DLL(/ MD)' 確認をしたが使用されている

ここで、私のメインプロジェクトファイルにsimple.c(http://curl.haxx.se/lxr/source/docs/examples/simple.c)のサンプルをコピーしました。私がコンパイルしようとすると、私は次のような出力を得る:

Neues Erstellen gestartet: Projekt: curl_project, Konfiguration: Debug Win32 
Die Zwischen- und Ausgabedateien für das Projekt "curl_project" mit der Konfiguration "Debug|Win32" werden gelöscht. 
Kompilieren... 
stdafx.cpp 
Kompilieren... 
curl_project.cpp 
Manifest in Ressourcen wird kompiliert... 
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1 
Copyright (C) Microsoft Corporation. All rights reserved. 
Verknüpfen... 
libcurl.a(ftp.o) : error LNK2001: Nicht aufgelöstes externes Symbol "_strtoll". 
libcurl.a(file.o) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_strtoll" in Funktion "_file_do". 
libcurl.a(cookie.o) : error LNK2001: Nicht aufgelöstes externes Symbol "_strtoll". 
libcurl.a(transfer.o) : error LNK2001: Nicht aufgelöstes externes Symbol "_strtoll". 
libcurl.a(ssh.o) : error LNK2001: Nicht aufgelöstes externes Symbol "_strtoll". 
libcurl.a(http.o) : error LNK2001: Nicht aufgelöstes externes Symbol "_strtoll". 
libcurl.a(mprintf.o) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "___umoddi3" in Funktion "_dprintf_formatf". 
libcrypto.a(b_print.o) : error LNK2001: Nicht aufgelöstes externes Symbol "___umoddi3". 
libcrypto.a(bn_word.o) : error LNK2001: Nicht aufgelöstes externes Symbol "___umoddi3". 
libcurl.a(mprintf.o) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "___udivdi3" in Funktion "_dprintf_formatf". 
libcrypto.a(b_print.o) : error LNK2001: Nicht aufgelöstes externes Symbol "___udivdi3". 
libcrypto.a(e_atalla.o) : error LNK2001: Nicht aufgelöstes externes Symbol "__alloca". 
libcrypto.a(eng_padlock.o) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__alloca" in Funktion "_ENGINE_load_padlock". 
libcrypto.a(sha512.o) : error LNK2001: Nicht aufgelöstes externes Symbol "__alloca". 
libcrypto.a(bn_prime.o) : error LNK2001: Nicht aufgelöstes externes Symbol "__alloca". 
libcurl.a(mprintf.o) : error LNK2001: Nicht aufgelöstes externes Symbol "__alloca". 
libcurl.a(formdata.o) : error LNK2001: Nicht aufgelöstes externes Symbol "__alloca". 
libcrypto.a(err_prn.o) : error LNK2001: Nicht aufgelöstes externes Symbol "__alloca". 
libcrypto.a(cryptlib.o) : error LNK2001: Nicht aufgelöstes externes Symbol "__alloca". 
libcurl.a(progress.o) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "___divdi3" in Funktion "_time2str". 
libssh2.a(scp.o) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_snprintf" in Funktion "_libssh2_scp_send_ex". 
C:\Dokumente und Einstellungen\Punkx\Eigene Dateien\Visual Studio 2008\Projects\curl_project\Debug\curl_project.exe : fatal error LNK1120: 6 nicht aufgelöste externe Verweise. 
Das Buildprotokoll wurde unter "file://c:\Dokumente und Einstellungen\Punkx\Eigene Dateien\Visual Studio 2008\Projects\curl_project\curl_project\Debug\BuildLog.htm" gespeichert. 
curl_project - 22 Fehler, 0 Warnung(en) 
========== Alles neu erstellen: 0 erfolgreich, Fehler bei 1, 0 übersprungen ========== 

を誰かが私が忘れてしまったか、問題がどこにあるか、何が見えますか?私はC++の初心者ですので、何かトライバルになる可能性があります... Thxのヘルプ!

答えて

6

Visual C++コンパイラでMinGWライブラリを使用しています。正しいバイナリパッケージを使用してください。

Visual C++を使用している場合は、.aファイルを扱うべきではなく、.libだけを使用してください。

+0

これらの設定方法について説明していただけますか? –

関連する問題