News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Envvar plugin not retreaving vars from config-file

Started by buiteldk, April 30, 2007, 05:31:43 PM

Previous topic - Next topic

buiteldk

I am using environment variables with CodeBlocks (envvar - plugin). Adding vars  works great, but after closing C::B and opening it again, only the first Environment variable is restored from the settings file (default.conf) although four vars are stored in de the default.conf file (ENVVAR0 through ENVVAR3).
Is there a solution to this problem?
Extra info:
Using WinXP, nightly build 3899, wx2.8.3
Again: the first environment var is restored, others not (although they stay in the default.conf). I verified it compiling ReactOS with four environment variables.

MortenMacFly

Quote from: buiteldk on April 30, 2007, 05:31:43 PM
I am using environment variables with CodeBlocks (envvar - plugin). Adding vars  works great, but after closing C::B and opening it again, only the first Environment variable is restored from the settings file (default.conf) although four vars are stored in de the default.conf file (ENVVAR0 through ENVVAR3).
It works very well for me - I can't reproduce. What tool are you using to verify what envvars are set? What OS / C::B version are you using? Please *always* put such information into reports!

You guys using wx28 already: This *could* be an issue with wx28?! Anybody can reproduce?

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

stahta01

#2
It worked for me with a highly patched CB, SVN 3909, using wxWidgets/wxMSW/XP with 2.6 compatible mode disabled.

Note, I only added a single Env. Var.
Note, CB crashes for me on a couple of releases ago during program close; it is possible that the crash was occurring before saving env var changes. I never got a useful crash info so did not report it. Does NOT seem to crash with SVN 3909.

Re-compiling C::B with no patches now.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

Just tried C::B SVN 3909 on XP SP2 and had no problems; using wxWidgets 2.8.3 CVS. Both C::B and wxWidgets with no patches.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MortenMacFly

Quote from: stahta01 on May 01, 2007, 04:27:01 PM
Note, I only added a single Env. Var.
Note, CB crashes for me on a couple of releases ago during program close; it is possible that the crash was occurring before saving env var changes. [...]
The issue is that the envvars do not get applied on C::B startup - but they seem to be saved (if I got buiteldk right). Anyways - when you tried with your "latest" version - did you have a single envvar there, too? If so, could you try having a few more ones?
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

stahta01

I tried 5 env var on the test without patches(wxMSW2.8.3); I then added an sixth using Nightly build 3504 and it worked also.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MortenMacFly

Quote from: stahta01 on May 01, 2007, 05:27:05 PM
I tried 5 env var on the test without patches(wxMSW2.8.3); I then added an sixth using Nightly build 3504 and it worked also.
Thanks Tim! :)

So I guess it's up to buiteldk again to give a few more details / steps to reproduce / a  sample project or anything similar. And again my question: What OS, what wx version, what C::B version?

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

buiteldk

I have added some extra info in the startpost. Sorry for providing incomplete info.
The envvar section contains the folowing vars:
<envvars>
   <ENVVAR0>
      <str>
         <![CDATA[1;ROS_BUILDNOSTRIP;yes]]>
      </str>
   </ENVVAR0>
   <ENVVAR1>
      <str>
         <![CDATA[1;CPLUS_INCLUDE_PATH;G:\RosBE\4.1.3\include;G:\RosBE\4.1.3\include\c++\4.1.3;G:\RosBE\4.1.3\include\c++\4.1.3\mingw32;G:\RosBE\4.1.3\lib\gcc\mingw32\4.1.3\include]]>
      </str>
   </ENVVAR1>
   <ENVVAR2>
      <str>
         <![CDATA[1;C_INCLUDE_PATH;G:\RosBE\4.1.3\include;G:\RosBE\4.1.3\lib\gcc\mingw32\4.1.3\include]]>
      </str>
   </ENVVAR2>
   <ENVVAR3>
      <str>
         <![CDATA[1;LIBRARY_PATH;G:\RosBE\4.1.3\lib;G:\RosBE\4.1.3\lib\gcc\mingw32\4.1.3]]>
      </str>
   </ENVVAR3>
</envvars>
After closing C::B and opening again, only the first var is showing (and working) in the plugin, the others not. I have to add the last three again and then they work, until I close C::B again...

stahta01

#8
It does NOT like semi colons is my guess. Try replacing ; with : if minGW GCC is being used, it might work till they can figure out the cause/fix.

I duplicated the issue using C:\apps\RosBE\4.1.2\include;C:\apps\RosBE\4.1.2\include\c++\4.1.2
Note, the above are valid paths on my system. It seems to check for valid paths somewhere on saving.

Tim S

CPLUS_INCLUDE_PATH
G:\RosBE\4.1.3\include|G:\RosBE\4.1.3\include\c++\4.1.3|G:\RosBE\4.1.3\include\c++\4.1.3\mingw32|G:\RosBE\4.1.3\lib\gcc\mingw32\4.1.3\include

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MortenMacFly

Quote from: stahta01 on May 01, 2007, 11:31:58 PM
It does NOT like semi colons is my guess.
...right - that will give me a hint. I believe it's related to the way configmanager stores/restores the information, but I'll check out... be patient... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

MortenMacFly

Quote from: MortenMacFly on May 02, 2007, 09:37:39 AM
...right - that will give me a hint.
It did. I'm using a SDK function there (GetArrayFromString) that obviously doesn't like semi-colons. We had that issue some time ago already (Thomas: remember?! ;-)) - I'll think about what to do...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

MortenMacFly

Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

buiteldk


buiteldk

Great! It works now using the '|'-symbol instead of the ';'. Thank you very much.