Author Topic: I have two questions looking forward answer!!!!!  (Read 11221 times)

boyeestudio

  • Guest
I have two questions looking forward answer!!!!!
« on: December 14, 2005, 01:34:12 pm »
First,I write a wxWidgets application and build and run it but a messagebox show me that "cann't find wxmsw26_gcc_cb.dll".So I copy the wxmsw26_gcc_cb.dll to the directory under C:\WINDOWS\system32.then the application run rightly.But I may ask a question,My method for this problem is right or good??

Second,I also find a problem that when I establish a new wxWidgets project,the default directory of this project alwayz located at C:\wxWidgets.So everytime I have a same project I ought to change the "Custom variable".So I hope change the default directory of the wxWidgets.(I don't like to move the wxWidgets file.)

Can anyone help me?Thanks!
« Last Edit: December 14, 2005, 02:03:17 pm by boyeestudio »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: I have two questions looking forward answer!!!!!
« Reply #1 on: December 14, 2005, 01:48:34 pm »
First,I write a wxWidgets application and build and run it but a messagebox show me that "cann't find wxmsw26_gcc_cb.dll".So I copy the wxmsw26_gcc_cb.dll to the directory under C:\WINDOWS\system32.then the application run rightly.But I may ask a question,My method for this problem is right or good??

IMHO it is not a good idea. I prefer not to put anything into system32. Better solutions are:

  • put the dll in a separate directory and the path to that directory in the System Path (environmental variable)
  • put the dll in the same directory as the application (the .exe file)


Michael

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: I have two questions looking forward answer!!!!!
« Reply #2 on: December 14, 2005, 02:00:30 pm »
Second,I also find a problem that when I establish a new wxWidgets project,the default directory of this project alwayz located at C:\wxWidgets.So everytime I have a same project I ought to change the "Custom variable".So I hope change the default directory of the wxWidgets.(I don't like to change the wxWidgets file.)

Yes, it's probably a good idea to change the wx template to use ${#wx.*} before RC3 comes out. The same probably goes for the other library-using templates.

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: I have two questions looking forward answer!!!!!
« Reply #3 on: December 14, 2005, 02:36:50 pm »
Quote from: boyeestudio (in a PM)
Quote
Yes, it's probably a good idea to change the wx template to use ${#wx.*} before RC3 comes out. The same probably goes for the other library-using templates.

Does the current release of code::blocks cann't modify it?
if not,How to change the templates?
thanks a lot!!

First of all, there's no reason not to post this. That way others who have the same problem can see it as well, and don't have to ask the same question when it has already been answered.

To answer your question: yes, you can change the template on your computer. Sorry, my earlier post was directed more at the developers than at you :oops:.
How to do it:
(Note: templates are stored in <CB_dir>\share\CodeBlocks\templates)

RC2 and before: Open the .cbp file(s) belonging to the wx template and replace "C:\wxWidgets-2.6.2" by your wx directory.

SVN builds: Open those same files and replace $(WX_DIR)\include by ${#wx.include}, $(WX_DIR)\lib by ${#wx.lib} and any $(WX_DIR) remaining after that by ${#wx}. Remove the line <Variable name="WX_DIR" value="C:\wxWidgets-2.6.2"/>.
The first time you create a project using such a template (or open any other project that uses the ${#wx} user variable, such as C::B's own CodeBlocks-NewBuild.cbp), you should be asked where your wx directory is, and your answer will be remembered.
(This is also the fix I propose be put into SVN to be included in coming releases)

Finding which project file belongs to which template is pretty obvious by their names, but can also be found by opening the relevant .template file in a text editor.

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: I have two questions looking forward answer!!!!!
« Reply #4 on: December 14, 2005, 02:55:03 pm »
Second,I also find a problem that when I establish a new wxWidgets project,the default directory of this project alwayz located at C:\wxWidgets.So everytime I have a same project I ought to change the "Custom variable".So I hope change the default directory of the wxWidgets.(I don't like to change the wxWidgets file.)

Yes, it's probably a good idea to change the wx template to use ${#wx.*} before RC3 comes out. The same probably goes for the other library-using templates.

I don't know if we can do it yet, but it would be a good idea for users to be able to leave the "fill in required custom variable for this project you've opened" blank if they hit cancel or OK with nothing entered. A note should go in the dialog as well that says "If you don't know what to put, hit cancel and you can update this variable later by opening Global Variables on the Settings menu."
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: I have two questions looking forward answer!!!!!
« Reply #5 on: December 14, 2005, 04:27:42 pm »
Yes, it's probably a good idea to change the wx template to use ${#wx.*} before RC3 comes out.
True.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."