User forums > General (but related to Code::Blocks)

$(PROJECT_DIR) won't change when open a new workspace.

(1/2) > >>

huzhongshan:
First I open a project(.cbp) in default workspace, and compile and debug( such things)...
then I close the project , and open a workspace (.workspace) ,  and compile ,  In post build step , I use $(PROJECT_DIR) , and the $(PROJECT_DIR) is still the first project directory( the first one I opened .cbp).

I click the different project in workspace , the $(PROJECT_DIR) cannot change the value to current active project .

ollydbg:

--- Quote from: huzhongshan on February 17, 2012, 03:18:43 am ---I click the different project in workspace , the $(PROJECT_DIR) cannot change the value to current active project .

--- End quote ---
So, you try to active a different project in workspace by "click"?

huzhongshan:

--- Quote from: ollydbg on February 17, 2012, 03:54:21 am ---
--- Quote from: huzhongshan on February 17, 2012, 03:18:43 am ---I click the different project in workspace , the $(PROJECT_DIR) cannot change the value to current active project .

--- End quote ---
So, you try to active a different project in workspace by "click"?

--- End quote ---
yeah , I clicked different project in workspace , many times , $(PROJECT_DIR) is still in last season(but not always).

ollydbg:

--- Quote from: huzhongshan on February 17, 2012, 04:22:52 am ---
--- Quote from: ollydbg on February 17, 2012, 03:54:21 am ---
--- Quote from: huzhongshan on February 17, 2012, 03:18:43 am ---I click the different project in workspace , the $(PROJECT_DIR) cannot change the value to current active project .

--- End quote ---
So, you try to active a different project in workspace by "click"?

--- End quote ---
yeah , I clicked different project in workspace , many times , $(PROJECT_DIR) is still in last season(but not always).

--- End quote ---
I think: You should right click on the project name, and select "activate" in the context menu to activate the new project. otherwise, project doesn't switch.

huzhongshan:
en , It works!

Navigation

[0] Message Index

[#] Next page

Go to full version