I have a Matlab GUI file, that uses several other .m files (all of them in the same directory as the GUI file) for working. I would like to remove any other file in the current directory that isn´t used by the GUI file. How could I do it easily and without any risk of removing any file needed?
You can check the dependency analysis offered in the editors tools menu.
This gives you an option to run the report on the Current Folder, which you can inspect to spot unused .m files. Other than this, I'm not aware of an automated way of doing this.
There is an automated way - run the function depfun, it will give you the list of the dependencies.
Related
In vscode, what happens if I don't save all files under the CodeRunner extension settings? What files are they talking about? The exe files? How can I automatically delete all exe files, as it will eventually take up storage.
I am using CodeRunner and MakeHidden extensions, but can't find any solutions online for this problem. Also I am a beginner.
Its asking if you want to save all of the files you edited. Each page you type on in vs code is a different file being stored on your system. Save all saves changes made on all of them.
I am using Visual Studio (2017) and I need the following.
I have a folder where a code generator puts the .h and .c files obtained from a formal model. This folder is not controlled by me, e.g. I cannot write in it, but it is updated by another team member.
By using the /I compiler options (or Additional include directories in the project properties) I managed to import all the generated header files in my VS project. What I am supposed to do is to integrate this generated code into a specific platform, this means that I have to compile both the generated code and the integration code on the target platform. The problem is, the compiler is not able to resolve the generated function definitions of the generated code as it only sees the .h files. What I got is a linking error (external symbol not resolved)
To solve the problem, I added the existing .c files manually, one by one. The obvious problems that comes with this solution are
manual boring work
when new files are generated, I need to manually import the new files
Question is: is there an option that can be set in order to specify the path of the source files without passing them one by one?
note: just copying and pasting the generated code in the VS project folder is not an acceptable solution.
Thanks
If you look at https://learn.microsoft.com/en-us/cpp/ide/working-with-project-properties?view=vs-2017 then you see there is a Source Directories property that has $(VC_SourcePath) as a default but (I think) to which you can add additional paths. The documentation is unclear whether that means all source files in such a path will be included for compilation.
At the bottom of the documentation it explains how to override certain project properties by providing an external properties file. It seems you can override the targets/sources using such a file. You can generate the file using a small tool that reads the filenames in those directories and adds them to the file.
You could also analyze the .vcproj file and build a small tool that wil re-write the part with your generated source directories, reading the filenames in those directories and adding them to the section in the .vcproj file.
We have subversion to help us manage our c files (and tortoise svn as front end).
When I want to know the changes in a c module, I (of course) only get the changes in the "body" of the program, not the changes in the include files.
So I wrote a small simple programm finding out all include files of a c module, checking the last subversion change date for each include file and writing the result in an output file.
This way I get a full impression of what has changed recently in the whole module.
But the program is very simple and I would like to know, if there is a solution out there that handles this "full view" of a c module in good way.
As I work on multiple independent change requests at one time in one subversion working folder, it does not help just looking at the result of "check for modifications".
Thanks a lot in advance.
Some handwork (onetime) required, but it can work
Using (file-level type for all files in every "project" /reqiure SVN 1.6+/) create virtual (or real) folders, which will include all files for each project. After it svn log inside such folder in WC will show only related to project-files changes
What is the minimal set of files after creating a project in Visual Studio (2010) that You have to send to somebody who uses a different compiler ? (for example the Debug folder isn't necessary, but what about .vcxproj.user file or other ?)
What are .obj files?
What kind of information is displayed in "watch" and "call stack" windows during debugging ?
The only files you absolutely need to send someone are the source files and the project file. The source files will usually be *.c or *.h files, but could include others, like resources.
As far as the other files go, each of them does something slightly different. The full list, as of VS2013, is found here. Most of them are generated by compiling and linking, or by opening the project in the IDE. A quick way to tell them apart is to do a Clean Solution, which should delete and intermediate files.
The obj files are intermediate files use during linking, and don't need to be packaged. In fact, nothing in the build or output folders needs to be included, as they'll all get rebuilt. The information that's used at debugging is mostly pulled from the obj and pdb files, which are both created each time you build.
I am using TortoiseHG for source code control in Windows, I forgot to edit the ".hgignor" file, and now I have a huge folder ".hg" which I know it's because of DLL and EXE and PDB files which I do not need them. Now changing the ignor file does not remove those files.
What should I do for deleting these files completely from my TortoiseHg data source?
if you want to stop tracking files, but leave them in working directory, use hg forget. Help also says you can achieve the same effect by using hg remove -Af.
I'm not sure what do you mean by «data source», but neither of those will remove the files from repository itself, because they are already a part of your history, and thus their previous versions will remain there. Forgetting them will only prevent your history from bloating even further with newer versions of those build artifacts.
You can use the hg remove command to remove files in your repository. If you are using TortoiseHG, you can right click on the file and go: TortoiseHG -> Remove File.
Check out the "How to stop tracking a file" section Here.