(C ++) CURL_STATICLIB : 해당 파일 또는 디렉토리 없음

시간있는 날

내 curl 라이브러리를 설치 및 구성하고 CodeBlocks를 통해 MinGW에 연결했습니다. 모든 것이 잘되었지만 코드를 빌드 할 때 오류가 발생합니다.

CURL_STATICLIB        No such file or directory

다음은 오류 스크린 샷입니다. CURL_STATICLIB 오류

#defines에서 CURL_STATICLIB를 정의했습니다. #defines의 CURL_STATICLIB

또한 여기에 빌드 로그가 있습니다.

-------------- Build: Debug in CurlTest (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -fexceptions -g CURL_STATICLIB -DCURL_STATICLIB -std=c++11 -lcurl -DCURL_STATICLIB -IC:\libs\curl\include -c C:\Users\ondre\OneDrive\Documents\Projects++\CurlTest\main.cpp -o obj\Debug\main.o
mingw32-g++.exe: error: CURL_STATICLIB: No such file or directory
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

내 컴파일러 정보 :

MinGW gcc (GCC) 5.3.0
마이크 킹핸

실패한 컴파일 명령에서 :

mingw32-g++.exe -Wall -fexceptions -g CURL_STATICLIB -DCURL_STATICLIB -std=c++11 \
-lcurl -DCURL_STATICLIB -IC:\libs\curl\include \
-c C:\Users\ondre\OneDrive\Documents\Projects++\CurlTest\main.cpp-o obj\Debug\main.o

CURL_STATICLIB전 처리기 정의 ( -DCURL_STATICLIB)에 추가 뿐만 아니라 실제로 다른 컴파일러 옵션 ( -g CURL_STATICLIB) 에도 추가했음을 알 수 있습니다 . 물론 문자열 CURL_STATICLIB은 g ++ 옵션이 아니고으로 시작하지 않기 -때문에 g ++는이를 컴파일 용 입력 파일의 이름으로 해석하여 오류를 설명합니다.

또한 -lcurl컴파일 옵션에 추가 libcurl하여 프로그램과 연결하려는 것을 나타냅니다 . 이것은 컴파일 옵션이 아니라 연결 옵션입니다. 컴파일러는이를 무시하고 링커 옵션에 추가하지 않은 경우 컴파일에 성공하면 프로그램이 링크에 실패합니다.

이 문제를 해결하려면 -lcurl컴파일러 옵션에서 제거 하고 다른 링커 옵션에 추가하십시오.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

lockf.c : 해당 파일 또는 디렉토리 없음

분류에서Dev

C stdio.h 해당 파일 또는 디렉토리 없음

분류에서Dev

MinGW + GVim Compile C / C ++ Failed (해당 파일 또는 디렉토리 없음)

분류에서Dev

OSX cpp (clang) 오류 : 해당 파일 또는 디렉토리 없음 : 'c'

분류에서Dev

GNU C ++ : unique_ptr.h 해당 파일 또는 디렉토리 없음

분류에서Dev

asm / errno.h : 해당 파일 또는 디렉토리 없음

분류에서Dev

"-bash : 해당 파일 또는 디렉토리 없음"설명

분류에서Dev

bash : ./idaq : 해당 파일 또는 디렉토리 없음

분류에서Dev

해당 파일 또는 디렉토리 없음-test.rb (LoadError)

분류에서Dev

boost / thread.hpp : 해당 파일 또는 디렉토리 없음

분류에서Dev

ksshaskpass : 해당 파일 또는 디렉토리 없음

분류에서Dev

PyInstaller-FileNotFoundError : 해당 파일 또는 디렉토리 없음 : ''

분류에서Dev

fopen 해당 파일 또는 디렉토리 없음

분류에서Dev

listdir () 해당 파일 또는 디렉토리 없음

분류에서Dev

CMake 해당 파일 또는 디렉토리 없음

분류에서Dev

Git Stat : 해당 파일 또는 디렉토리 없음

분류에서Dev

list.cc : 해당 파일 또는 디렉토리 없음

분류에서Dev

Docker + Java -VSTS 해당 파일 또는 디렉토리 없음

분류에서Dev

docker chmod 해당 파일 또는 디렉토리 없음

분류에서Dev

asm / errno.h : 해당 파일 또는 디렉토리 없음

분류에서Dev

flexClient_ <number> .cache (해당 파일 또는 디렉토리 없음)

분류에서Dev

PHPUnit, Phar 및 해당 파일 또는 디렉토리 없음

분류에서Dev

#! / bin / bash-해당 파일 또는 디렉토리 없음

분류에서Dev

Sublime [Errno 2] 해당 파일 또는 디렉토리 없음 : 'node'

분류에서Dev

Sublime [Errno 2] 해당 파일 또는 디렉토리 없음 : 'node'

분류에서Dev

"-bash : 해당 파일 또는 디렉토리 없음"설명

분류에서Dev

bash : 해당 파일 또는 디렉토리 없음

분류에서Dev

linux cat : 해당 파일 또는 디렉토리 없음

분류에서Dev

cd : / Home : 해당 파일 또는 디렉토리 없음

Related 관련 기사

  1. 1

    lockf.c : 해당 파일 또는 디렉토리 없음

  2. 2

    C stdio.h 해당 파일 또는 디렉토리 없음

  3. 3

    MinGW + GVim Compile C / C ++ Failed (해당 파일 또는 디렉토리 없음)

  4. 4

    OSX cpp (clang) 오류 : 해당 파일 또는 디렉토리 없음 : 'c'

  5. 5

    GNU C ++ : unique_ptr.h 해당 파일 또는 디렉토리 없음

  6. 6

    asm / errno.h : 해당 파일 또는 디렉토리 없음

  7. 7

    "-bash : 해당 파일 또는 디렉토리 없음"설명

  8. 8

    bash : ./idaq : 해당 파일 또는 디렉토리 없음

  9. 9

    해당 파일 또는 디렉토리 없음-test.rb (LoadError)

  10. 10

    boost / thread.hpp : 해당 파일 또는 디렉토리 없음

  11. 11

    ksshaskpass : 해당 파일 또는 디렉토리 없음

  12. 12

    PyInstaller-FileNotFoundError : 해당 파일 또는 디렉토리 없음 : ''

  13. 13

    fopen 해당 파일 또는 디렉토리 없음

  14. 14

    listdir () 해당 파일 또는 디렉토리 없음

  15. 15

    CMake 해당 파일 또는 디렉토리 없음

  16. 16

    Git Stat : 해당 파일 또는 디렉토리 없음

  17. 17

    list.cc : 해당 파일 또는 디렉토리 없음

  18. 18

    Docker + Java -VSTS 해당 파일 또는 디렉토리 없음

  19. 19

    docker chmod 해당 파일 또는 디렉토리 없음

  20. 20

    asm / errno.h : 해당 파일 또는 디렉토리 없음

  21. 21

    flexClient_ <number> .cache (해당 파일 또는 디렉토리 없음)

  22. 22

    PHPUnit, Phar 및 해당 파일 또는 디렉토리 없음

  23. 23

    #! / bin / bash-해당 파일 또는 디렉토리 없음

  24. 24

    Sublime [Errno 2] 해당 파일 또는 디렉토리 없음 : 'node'

  25. 25

    Sublime [Errno 2] 해당 파일 또는 디렉토리 없음 : 'node'

  26. 26

    "-bash : 해당 파일 또는 디렉토리 없음"설명

  27. 27

    bash : 해당 파일 또는 디렉토리 없음

  28. 28

    linux cat : 해당 파일 또는 디렉토리 없음

  29. 29

    cd : / Home : 해당 파일 또는 디렉토리 없음

뜨겁다태그

보관