how to know the path,where the errors and warnings are stored in eclipse - c

My doubt is related to the storage of Error/Warning Messages.
For example I wrote a C program in Eclipse IDE and compiled. The Error/Warning Messages are displayed in the problem tab.
If this is the situation which file in my computer contains the Error/Warning Messages. I need to know the location of this file because I am doing a project related to IDE creation.
Any suggestions or Ideas?

First of all you should know that what you see in Problems view in eclipse has not been saved as a log file in plain text. But if you want to see it:
1- Under each workspace there is a folder named ".metadata" . In linux it is a hide folder and you have to choose show hide files. I am not sure about windows.
2- open this path ".plugins/org.eclipse.core.resources/.projects/" under ".metadata".
3- choose the sub folder with the project name. (The project you want to see prolems for it).
4- there is two files holding the problems named ".markers" and ".markers.snap"
As said this is under Linux. Under windows may be it differs. But it should be something like this.
Not every text editor opens these files. I used emacs!

Related

what does "save all files" mean in vscode? I'm looking to delete all exe files automatically after I get my output in C

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.

Changing Directory of STM32CubeIDE Projects

When I create a new STM32CubeIDE project, it default saves it to my /Documents directory. This isn't too bad except I like to have a folder for each application so that it isn't just a bunch of files. I tried creating a folder called "STM32CubeIDE" to save new projects to, put it gives me an error: "overlaps the location of another project".
I've done some googling and found that this issue also exists in Eclipse (which makes sense) but couldn't solve my problem from those solutions.
I was also wondering if there is a way to move all of my existing projects to this newly created folder? Last time I tried, the IDE flipped out on me and couldn't find my stuff.
First of all, do not call your folder "STM32CubeIDE" if this already exists. Use a different name, because this is normally used by default and it may cause issues (probably the reason why you are getting that error).
When you install or update STM32CubeIDE it gives you the option to choose where you want your default folder to be. For example, my default folder is
C:\Users\%USERPROFILE%\STM32CubeIDE\workspace_1.6.0\
Now if you want to use different folders for different projects, there are two options:
You can Export your project (application) to a desired folder and then Import it using the File tab. This is a good method if you want to make backups, or just want to make sure that all relevant files are transferred correctly to avoid "missing file" issues.
The other method (my favourite) is to simply copy you project folders and paste them to a different folder, wherever you want to put them. Then you simply open STM32CubeIDE, go to File > Open Projects from File System... and chose your project. You might get a pop-up about software compatibility issues (if you made an update), etc. but this should open up your project and show it in the Project Explorer.

How to fix function (that validates input) from not reading a text file? [duplicate]

Trying out the Clion EAP on the Mac. How does one change the current working directory for a launched program? It appears to be set to the output directory of the binaries.
This can be changed via the Run -> Edit Configurations... dialog, just like Idea.
The mix of needing to make changes to CMakeLists.txt for so much of the configuration just threw me, and I've been hunting for a way to change it there, but this bit at least is consistent with the other IDEs, which is good.
Hopefully they'll improve the rest of the Project Settings in a similar fashion.
The "Working Directory" is where the executable starts. Modifying the "Working Directory" in the Configurations setting tells Clion to change to the "Working Directory" after the executable starts execution.
If you want to change where the executable starts execution you will need to add a line to the CMakesLists.txt file.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(TimeServer ${SOURCE_FILES})
Position in the cmakes file is important. If you add the set command after the add_executable it will not work. It must come before.
These answers are relatively old. Not sure when the feature was added but there's a very nice UI way to set the current working directory now.
I made a YouTube tutorial for my COSC1030 (Beginning C++) students but the solution is the same for everyone:
https://youtu.be/dTtZEAfh_LM
If you know your CLion fairly well and don't need a demo, here's a short-hand version: Edit Configurations (from drop-down menu at top right of screen), enter the directory you want to use in Working Directory or select via "..." pop-up.

Problems with GCC "build file: no target in no project"

I have a problem with C. When I want to compile my sources codes, I see the message:
=== Build file: "no target" in "no project" (compiler: unknown) ===
The classic Hello world works, but I have this message.
I want to make a program that read all absolute directories and subdirectories recursively, print all names with 252 characters or more in a file. I use codeblocks and GNU gcc.
I have just had this problem with Codeblocks. Although I had a compiler.
The problem was that I have not saved the file with the correct extension - e.g. it was Untitled4 instead of Untitled4.c or Untitled4.cpp (for c++). Simply renaming the file has worked.
I just had this problem too but I managed to get it going. I had to go to New --> Project --> Console Application.
My guess is that an update has changed functionality or something. I distinctly remember that I could just simply add a new Empty File and then be able to debug and it run from there. Apparently not anymore. I now specifically have to go to the add new projects option and then choose the console application.
Don't forget to choose the C compiler and not C++ compiler when it walks you through the process.
I have encountered the same problem. So i found that i do have created a project file, but my files(.cpp, .h and other) files were not included in my project, to check that open your codeblock ide-> open your project-> and on the left hand side you will see a Management tab, which should contain all your file( if you are not able to see Management tab, just follow step: go to view panel )
While the process is active, you canĀ“t run the program.
Open the Task Manager and kill the process created by CodeBlocks (the same name of your project).
Just create a new project and Copy and paste your texts into the new files. It will work.

Why do I get a "Metafile not found" error when trying to compile a WPF application?

I had to rebuild a project in my application.
I created a new project, created each file, and copied the contents of each file into the new project one at a time making all the necessary changes.
Now when I try to compile the project, it gives me three errors:
The metafile c:\projects\project1\CustomerModule\bin\Debug\CustomerModule.dll could not be found.
Application Definition Element could not be given by the library project file.
The project file has invalid properties.
Clicking any of these does nothing.
What are these errors telling me? What do I need to change to get my application running again?
New info: If I do a "rebuild" on just the project, I only get the second two errors, so these seem to be the original issue, but what is the library project file and what properties are invalid?
I found the answer on this forum question.
Basically the thing I did wrong was copy images from a directory in one module to a directory in another module within the Solution Explorer. Don't do this. Instead, copy them from the Windows Explorer into the Solution Explorer, then everything works fine.
Click add a reference and browse for the dll file you want to use.
You may have to rebuild the dll for it to work.

Resources