-8

I have tried googling, and found no solution to my problem. I'm trying to learn how to use libcurl, a c networking library. I tried compiling a program that was automatically generated from curl, and a few examples i found online but nothing happened. I got no errors or logs, the program stopped "sucessfully" but i get no output. I also cant write to the console either while the library is included.

Any help is appreciated.

you are viewing a single comment's thread
view the rest of the comments
[-] Irelephant@lemm.ee 3 points 3 weeks ago

That works perfectly

PS C:\Users\username\3ds> gcc test.c -o test.exe 
PS C:\Users\username\3ds> ./test.exe
    Hello world

[-] e0qdk@reddthat.com 5 points 3 weeks ago

Try adding some prints to stderr through my earlier test program then and see if you can find where it stops giving you output. Does output work before curl_easy_init? After it? Somewhere later on?

Note that I did update the program to add the line with CURLOPT_ERRORBUFFER -- that's not strictly needed, but might provide more debug info if something goes wrong later in the program. (Forgot to add the setup line initially despite writing the rest of it... 🤦‍♂️️)

You could also try adding curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); to get it to explain more details about what it's doing internally if you can get it to print output at all.

this post was submitted on 29 Nov 2024
-8 points (25.0% liked)

Programming

17672 readers
36 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS