Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: Tue Apr 29 17:36:18 CEST 2025

Total time taken to generate the page: 0.01064 seconds