U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ Developers corner » Different getenv("PATH") and $PATH on macos M1 (for libclang.dylib)
Re: Different getenv("PATH") and $PATH on macos [message #59488 is a reply to message #59487] Thu, 05 January 2023 07:03 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
    FILE* pip = popen("exec bash -c 'echo $PATH'", "r");
    if (!pip)
    {
		LOG("can not open pipe!");
    }

    char lineversion[600];
    memset (lineversion, 0, sizeof(lineversion));
    if (!fgets(lineversion, sizeof(lineversion), pip))
    {
		LOG("fgets error!");
    }

	String path2;
	path2.Cat(lineversion);
	LOG("path2="<< path2);


This works. But I wonder if there is a more effective way in upp? Upp way...

[Updated on: Thu, 05 January 2023 07:11]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Compilation on Linux +GUI,X11
Next Topic: Cannot link with obj generated on custom build step.
Goto Forum:
  


Current Time: Mon Jun 15 03:25:07 GMT+2 2026

Total time taken to generate the page: 0.00708 seconds