Author Topic: Global variables error spamming, bug or feature request ?  (Read 7406 times)

Offline dje

  • Lives here!
  • ****
  • Posts: 682
Global variables error spamming, bug or feature request ?
« on: August 10, 2007, 02:47:17 pm »
Hi all !

When I open my plugin project on a fresh Code::Blocks, I am asked 23 times (true, not a joke) for cb and wx variables.
Isn't it possible to ask simply once and remember I don't want to set them ?
I have neither wxWidgets nor Code::Blocks dev environment installed on this PC, I have nothing to set...

Thanks,

Dje

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Global variables error spamming, bug or feature request ?
« Reply #1 on: August 10, 2007, 02:53:03 pm »
here I was thinking you just had to set them or you would be asked forever. if I'd known I only had to click 23 times I would have been more patient ;)

Offline dje

  • Lives here!
  • ****
  • Posts: 682
Re: Global variables error spamming, bug or feature request ?
« Reply #2 on: August 10, 2007, 02:58:45 pm »
I fell asleep on escape key...
But forgive me, it appears only 22 times, better for 2 variables to set  :wink:

Dje

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Global variables error spamming, bug or feature request ?
« Reply #3 on: August 10, 2007, 03:48:30 pm »
When I open my plugin project on a fresh Code::Blocks, [...]
I wonder if you really mean project or a *workspace* with several projects/targets that all use the global variables. We are aware of this issue but there is no easy solution currently. As a workaround:
- set the variables (;-))
- use global variables wisely (thus is you need them within a project for *all* targets, use it on project level only)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Global variables error spamming, bug or feature request ?
« Reply #4 on: August 10, 2007, 03:51:59 pm »
When I open my plugin project [...]
I have neither wxWidgets nor Code::Blocks dev environment installed on this PC
In this case, you will not be compiling your plugin. :)
But seriously, for a Code::Blocks plugin, you need those.

here I was thinking you just had to set them or you would be asked forever.
You will be asked forever. If you hit the build button, it will ask again.

See, the point is, if you use a global user variable then it must be defined. And Code::Blocks will not give up asking you for it, as it is otherwise impossible to run the build. The canonical use for global uservars is to define include and library paths in a system-independent way. If the variables aren't defined, the include/library paths are not defined, the build cannot work.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline dje

  • Lives here!
  • ****
  • Posts: 682
Re: Global variables error spamming, bug or feature request ?
« Reply #5 on: August 10, 2007, 04:02:55 pm »
To be more precise:
- I open C::B on a PC which is not lucky : no SVN, no C::B dev environment, no wxWidgets environment, no MinGW  :)
- Default workspace is used, start page is displayed
- I open ThreadSearch plugin project to rework header files; I know I can't build it and I never clicked on Build
- 22 times, I close pop-ups asking for cb and wx variables. 22 is systematic
- My project is the only one open
- There is only one target.

I think Code::Blocks is great but it can be used just for file edition with the possibilities it offers (CC, symbol browser, jump to...).
The compiler/build part is too intrusive in this case. It should not complain as I asked nothing but editing my project files.

Dje

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Global variables error spamming, bug or feature request ?
« Reply #6 on: August 10, 2007, 04:17:45 pm »
To be more precise:
It's easier: Don't define #wx and/or #cb and open the C::B workspace (the one including C::B and all contrib plugins, for example). Easy to reproduce, but as I aid: Not easy to fix though... In the meantime disabling CC might help (maybe... I need to try that...).
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline dje

  • Lives here!
  • ****
  • Posts: 682
Re: Global variables error spamming, bug or feature request ?
« Reply #7 on: August 10, 2007, 04:43:26 pm »
As I said, I just wanted to edit header files outside home.
I took my project on a USB key at office and opened my project.
How could I open any C::B workspace without SVN environment ?

I just wanted to edit sources files and put them back in my environment tonight.
I won't disable CC, if I did it, I wouldn't use C::B for edition but Portable Scite.

Well, I can do with it, that was just a remark, feeling strange beeing bothered 2*11 times for the same thing

Dje

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Global variables error spamming, bug or feature request ?
« Reply #8 on: August 10, 2007, 07:29:51 pm »
Well, I can do with it, that was just a remark, feeling strange beeing bothered 2*11 times for the same thing

I understand your point, just write some garbage into the base textbox like "1234" or simply "0"  that worked for me.  :wink: