strange error when using source insight execute UV4 - batch-file

i want to execute UV4 in source insight, and catch the errors and display.
the batch file context is
c:\Keil\UV4\UV4.exe -b d:\workingcopy\test_project\test.uvproj -o log
type d:\workingcopy\test_project\log
when i run the batch file, and the compile completed correct, it works fun.
but if the compile end by the error, the source insight will show ...\231 does not exist.
how to fix it ?
thanks for any help :)

Now i know where the devil is.
the error messages output by UV4, is PATH\FILE(LINE)
and the regex i use lead SI deal the line as a file.
the error line number is 231, so the SI show "231 does not exist"

In my Python scripts which call uVision I check the error level of UV4 plus I parse the build log using regex. I always used this manual for reference.

Related

Could not find file 'C:\Users\crims\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\...\MonitoringSystemDatabase.mdb'

I have a Menu Form and it has 7 UserControls every time I execute my program I keep seeing this error.
I have no idea what error is this. I tried searching but there are no error close related to mine. Then I compare my error with this Project Assemblies error
Can anyone help me with this? I have no idea what causes this error.
The error is caused by your code looking for the MS Access database file called:
MonitoringSystemDatabase.mdb
...is located at path:
C:\Users\crims\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\cjz5kapb01\
...but it is not.
Locate file MonitoringSystemDatabase.mdb (perhaps with +E to Search), note the actual path of the file, and correct the path in MainMenu.vb.
The error message is very clear, so why all the searching?
Either the file isn't there, or the application can't see it where it expects to find it.
Try moving the file to:
C:\Users\Public\Documents\MonitoringSystemDatabase.mdb
and adjust you project accordingly.

Eclipse CDT: Mapping console output to source file and line

While debugging code it helps to have source filename and line number on console output. I already use FILE and LINE macros. But it would be great if double clicking a line in the console output would take me to the exact source line which was responsible for outputting that line of log. Can eclipse parse console output and do something like this? It need not work all the time, only when the log line is in a specific format and the source filename and line number are valid.
It's possible to use a workaround if you add the pydev plugin and a few lines of python to call your main function. You can find the needed code here: https://github.com/oct15demo/python_calls_cpp
As noted there, I posted a query on the Eclipse forum to find out the status of any ongoing effort or obstacles to implement within Eclipse.
I could not find out any further information on the feature, if it's there, it's well hidden.
Update March 17, 2022, I shall be working on the feature for Eclipse, don't have an estimate of time yet.

Makefile Error?

I have a makefile which further calls a xml converter tool. The details of the tool and makefile seems irrelevant here. Reason being, there is no problem in the overall makefile, but this xml converter tools fails and returns an error message. Since this is not a makefile error, therefore makefile doesnt stop executing rest of the code. Is there anyway we could avoid this problem? I was thinking of adding a batch file which executes that tool, and then we can call the batch file from the makefile, but then again, how will we know the batch file returned an error? Any hint would be appreciated.
PS: By avoiding the problem, I meant, that makefile should stop when the tool returns an error.
If a grep exist on your system, you could do something like the following rule:
FILE: DEP-FILE
! XMLCONVERTER $< | grep -q "YOUR ERROR STATEMENT"
In case that XMLCONVERTER prints "YOUR ERROR STATEMENT" to stdout, a make error is raised.

error when i am calling c binary from tcl script

i have created (executable) binary "sample" from .c using
gcc sample.c -o sample
it's created binary named sample sucessfully.
when i run this from terminal like ./sample it display a result..
but when i run this from my tcl like exec ./sample it shows error like ./sample no such file or directory..
can anyone help me to solve the above error?
If sample in the current directory is executable, exec ./sample should work. Assuming that the binary itself does not generate that error message when it runs, of course. (Messages on stderr will become errors in Tcl by default.)
Check that puts [pwd] tells you the place you expected; if you had a cd elsewhere in your script then that relative path would no longer work. If this is the problem, use the full, absolute path to the compiled file. (You can compute this at the start of your script using file normalize sample, but you have to do this before you cd; good library packages do not use cd precisely because it is so confusing while simultaneously being usually totally unnecessary for them…)
If file exists ./sample is true (and file executable ./sample is also true, which it should be if it has just been produced by a compiler) then check immediately after the failed execution what the contents of the errorInfo and errorCode global variables are. They may give a bit more indication of what went wrong. (Or maybe not; can't tell for sure.)

"Threat detected" from AVG when trying to run my C program

I've been working on a project I have to do for school,
They basically asked us to separate every question to a file of its own,
so what I was trying to do was comment the rest of the files or exclude them off the project, and when I try to 'Start without debugging', I end up getting this message. I did this before and everything was fine:
the weird part is that if i remove the solution and make a new one and only make one .c file it works...
I was also trying to remove the "Ex2" folder and made it again, it didn't help.
When I choose move to vault it doesn't find the file.
Edit: I've run a scan and it didn't find any infections on the computer and now that i'm trying to run the program i don't see the threat anymore, I only get this message:
Please, i would really appreciate some help (again... )
I it find very interesting that your build failed. As a result, it is HIGHLY likely that no output was built.Yet your virus scanner flags a compiled file.
If your code didn't compile, where did this executable come from?
Perhaps you do have a real virus?
It seems the last error, that is partially cut off, is "Link: Fatal Error LNK1104. Cannot Open File". That suggests that the file is locked, write-protected, or otherwise blocked.
Is anything else holding open your executable, which prevents recompilation?
I wouldn't blame your virus scanner from flagging an attempt to write to a running .exe as suspicious.

Resources