Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3729  / 2 Years ago, tue, march 22, 2022, 4:22:18

I installed libcurl using :sudo apt-get install libcurl4-openssl-dev. When I try to compile my program I read that we have to pass where libcurl is located to the GCC compiler(although for me its located at /usr/include).
Therefore according to http://ubuntuforums.org/showthread.php?t=1175115 I compiled it using



gcc myfile.c $(pkg-config --libs --cflags libcurl) -o myprogram


But if I only enter pkg-config --cflags libcurl it prints nothing (only a blank space). The program compiles correctly if I add the flag and --libs. I only do not understand why pkg-config --cflags libcurl returns nothing)


More From » compiling

 Answers
7

  • --cflags is intended to give you any pre-processor or compile flags required for the packages/libraries on the command-line; you get a blank space because there are no such required flags for libcurl; that's perfectly normal.


[#36667] Tuesday, March 22, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sipwing

Total Points: 245
Total Questions: 100
Total Answers: 118

Location: Aland Islands
Member since Thu, Oct 22, 2020
4 Years ago
sipwing questions
Sun, May 29, 22, 22:00, 2 Years ago
Fri, Jun 24, 22, 08:46, 2 Years ago
Fri, Dec 23, 22, 00:04, 1 Year ago
;