Author Topic: Libcurl permission denied  (Read 3766 times)

Offline algo_trader_newb

  • Single posting newcomer
  • *
  • Posts: 2
Libcurl permission denied
« on: July 12, 2024, 06:49:13 pm »
Im new to Code::Blocks but have been using it for sometime learning through learncpp.com. Wonderful website.

Ive decided now that i want to create a project scrapping data from kitco and updating the price of gold every 30 seconds. I am using

#include <curl/curl.h>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <thread>
#include <chrono>
#include <Python.h>
#include "matplotlibcpp.h"


Here is my problem... I keep getting denied permission to access curl library.

Things i have done to solve issue --

1. turned off windows defender firewall for private and public networks
2. checked both libcurl and sfml properies to make sure i have full control
3. ensured i have proper executables inside my toolchain executables
4. updated my Settings -> compiler -> linker settings -> link libraries
to make sure i have all proper folders and files needed to execute
5. updated my Settings -> compiler -> Search directories
to make sure i have all proper folders and files, includes needed to execute
6. updated my Project -> build options -> linker settings -> link libraries
to make sure i have all proper folders and files needed to execute 
7. updated my Project -> build options -> Search directories
to make sure i have all proper folders and files, includes  needed to execute 
8. ensured my enviroment variables -> system variables
include all proper paths to curl library folders of
bin, lib and include
9. ran code block properties to set to always run as administrator

and yet i keep getting permission denied. Can anyone tell me why or how i can go about solving this issue? Help is greatly appreciated. Thanks everyone and happy coding on CodeBlocks!  ;D

ld.exe||cannot find C:\Users\kylem\Desktop\C++_Project_Libraries_Downloads\curl-8.8.0_3-win64-mingw\lib: Permission denied|


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7665
    • My Best Post
Re: Libcurl permission denied
« Reply #1 on: July 12, 2024, 07:42:25 pm »
Files under "C:\Users\kylem" is owned by kylem not by administrator.

You need to use web search tools to find out how edit the folder permissions.

NOTE: Running as administrator can cause weird problems under Linux.

Edit2: I would stop running Code::Blocks as Administrator; and give ownership and right to  "C:\Users\kylem" and sub-folders back to kylem most likely you have some things owned by one or the other and this is the cause of the problem.

Tim S.

« Last Edit: July 12, 2024, 07:47:36 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline algo_trader_newb

  • Single posting newcomer
  • *
  • Posts: 2
Re: Libcurl permission denied
« Reply #2 on: July 12, 2024, 08:12:23 pm »
Files under "C:\Users\kylem" is owned by kylem not by administrator.

You need to use web search tools to find out how edit the folder permissions.

NOTE: Running as administrator can cause weird problems under Linux.

Edit2: I would stop running Code::Blocks as Administrator; and give ownership and right to  "C:\Users\kylem" and sub-folders back to kylem most likely you have some things owned by one or the other and this is the cause of the problem.

Tim S.

Hi Tim,

Thanks for your response.

I am almost certain that i have my permissions set to read and writing ability for kylem. I have since then stopped running CB as admin. Right now i am unsure if kylem is the woner of both folders for SFML and curl. Below is a screenshot i took for visual reference.   :)

https://postimg.cc/kB94Pwkw

Please let me know any next steps needed to take, it feels trivial to solve but not sure why I cant figure it out or why ChatGBT does not know either.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7665
    • My Best Post
Re: Libcurl permission denied
« Reply #3 on: July 12, 2024, 08:44:37 pm »
I really do not have the knowledge to help you remoting; it is likely under advanced.

You might try moving the folders to be under another sub-folder; I never tried to build or use files on the Desktop; there might be some weird permission issue to that location.

Edit: Link to FAQs https://wiki.codeblocks.org/index.php/FAQ maybe one of them will help.

Tim S.
« Last Edit: July 13, 2024, 04:19:58 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org