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   |
 |
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
|
|
|
 |
|
Different getenv("PATH") and $PATH on macos M1 (for libclang.dylib)
By: fudadmin on Wed, 04 January 2023 04:36
|
 |
|
Re: Different getenv("PATH") and $PATH on macos
By: Novo on Thu, 05 January 2023 02:23
|
 |
|
Re: Different getenv("PATH") and $PATH on macos
By: fudadmin on Thu, 05 January 2023 05:43
|
 |
|
Re: Different getenv("PATH") and $PATH on macos
By: fudadmin on Thu, 05 January 2023 07:03
|
 |
|
Re: Different getenv("PATH") and $PATH on macos
By: Oblivion on Thu, 05 January 2023 16:37
|
 |
|
Re: Different getenv("PATH") and $PATH on macos
By: fudadmin on Thu, 05 January 2023 23:37
|
 |
|
Re: Different getenv("PATH") and $PATH on macos
By: Novo on Thu, 05 January 2023 18:47
|
 |
|
Re: Different getenv("PATH") and $PATH on macos
By: fudadmin on Fri, 06 January 2023 00:05
|
 |
|
Re: Different getenv("PATH") and $PATH on macos
By: Novo on Fri, 06 January 2023 06:06
|
 |
|
Re: Different getenv("PATH") and $PATH on macos
By: fudadmin on Fri, 06 January 2023 09:47
|
 |
|
Re: Different getenv("PATH") and $PATH on macos
By: Novo on Tue, 10 January 2023 16:43
|
Goto Forum:
Current Time: Tue Apr 29 17:36:18 CEST 2025
Total time taken to generate the page: 0.01064 seconds
|