Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

I have two questions looking forward answer!!!!!

(1/2) > >>

boyeestudio:
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!

Michael:

--- Quote from: boyeestudio 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??

--- End quote ---

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

Urxae:

--- Quote from: boyeestudio on December 14, 2005, 01:34:12 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.)

--- End 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.

Urxae:

--- 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.

--- End quote ---

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

--- End quote ---

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.

280Z28:

--- Quote from: Urxae on December 14, 2005, 02:00:30 pm ---
--- Quote from: boyeestudio on December 14, 2005, 01:34:12 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.)

--- End 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.

--- End quote ---

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."

Navigation

[0] Message Index

[#] Next page

Go to full version