To change Eclipse working folder so that file paths are the same when running project from IDE and when running the binary from terminal, you have to set the working directory (similar to Visual Studio) using the Run Configurations - Arguments - Working Directory: ${workspace_loc:MyProject/Debug}
Note that Eclipse run configurations are saved in <eclipse-workspace>.metadata/.plugins/org.eclipse.debug.core/.launches
To copy files on Linux Eclipse in post-build step:
- Select Project - Properties - C/C++ Build - Settings - Build Steps
- In Post-build steps, enter cp source destination
If you have changed the working folder as explained above, then source will be relative to that working folder. If, for example, you want to copy a folder to working folder, you could use cp -f -R ../src/config .
You can enter more than one cp command by separating them with a semicolon (;)
No comments:
Post a Comment