News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

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

Started by huzhongshan, February 17, 2012, 03:18:43 AM

Previous topic - Next topic

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 .
So, you try to active a different project in workspace by "click"?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

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 .
So, you try to active a different project in workspace by "click"?
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 .
So, you try to active a different project in workspace by "click"?
yeah , I clicked different project in workspace , many times , $(PROJECT_DIR) is still in last season(but not always).
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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

huzhongshan


LETARTARE

I had the same problem, but I thought it was from my program!
It is not at all intuitive
A big thank you also
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'