Probem with XCode and C Program - c

My computer has suddenly stopped opening XCode to display graphs generated by running a previously-tested C program. It's giving me the following error (which it always did before even when it worked), and then just freezes when it immediately used to open the graphs.
(base) [~]$ root plot_hard_RE.C
root [0]
Processing plot_hard_RE.C...
Warning: wrong member access operator '.' plot_hard_RE.C:2:
When I do control - c, it doesn't take me back to root. Instead it just says "There was a crash.
This is the entire stack trace of all threads: ..."
Does any have any ideas on how I can troubleshoot this problem?
I am on a Linux machine but SSH'ing into a server.
Note: When someone else SSH into the server and tries the same command from their machine, it works fine. I think it's a problem with my machine.

Related

Access is denied while running a C output

I am getting an error while running the output(a.exe) of a C program. Command prompt showing "Access is denied". I have reinstalled gcc but same problem is arriving. Here is the screenshot of error
That output is seen, when you try to run a x64 binary on a x86 system.
But there are numerous other possibilities.
Another likely possibility is your Antivirus realtime scanning.
Be sure it does not block access for you.
Provide more details and I'll update this accordingly.

Unable to run C programs using any compiler

I had to write code in C and run it for an assignment. Since this is the first time that I'm using C, I downloaded MinGW as a compiler and Code Blocks as an IDE. I had no problem compiling the code given by my professor but it never runs (this is a simulation for an M/M/1 queue). When I say it never runs, I mean that a command prompt like window pops up and nothing happens after that. Every time I close that window and try to compile the SAME program again, I get an error that says that permission to access the file has been denied.
I then deleted Code Blocks and tried running the program through command prompt but I have the same problem. I've now tried doing it using LCC-Win but nothing has changed. Another weird thing that happens when I run any program is that three instances of the .exe file of that particular program are in my processes under task manager. I then need to restart my computer to try compiling that same program.
I even tried running a simple Hello World program and I have the same problem!
I am currently using a Windows 7 32-bit system.
Any help would be greatly appreciated!

getchar() in c program - Eclipse Luna - Permission Denied

Integer and Float based programs are working good in my Eclipse Luna Installation, without any permission problems created by Windows Process, but a string based C Program, gives errors or sometimes builds but empty console.
I hold a latest copy of
Eclipse IDE for C/C++ Developers
Version: Luna Service Release 1 (4.4.1) - Build id: 20140925-1800
and
MinGW - mingw version 0.6.2
on a Window 7 Ultimate 32-bit operating system.
This would be my code
This screenshot would be after the first build Ctrl+B
First Build shows no error/exceptions.
But when I tried to run it,
I get empty console, I believe atleast Enter String should have been present if error starts from getchar, but surprisingly the console is empty
I tried rebuilding it, below message came up.
I tried running it again Ctrl + F11
It's again empty.
I am not able to replicate the Permission Denied scenario, but however on monitoring the process I found this
but as soon as I end these processes, It was capable of building, but empty console again with no messages in problems tab. On occasions, these permission denied is appearing, and as soon as I end the process, this disappears.

Code Blocks compilation error

Whenever I am trying to build and run a program the second time this error is coming on the screen:
cannot open output file C:\Users\Username\Documents\filename.exe Permission denied
You either 1. don't have permissions to write to the directory(unlikely)
or 2. Your executable is still in the memory. Hit CTRL+ALT+DEL select Windows Task Manager and Find+End your executable "filename.exe".
It means The directory your code is in doesn't have write permission. But try moving your code in some write permitted directory. BTW in my windows this problem occurs sometimes. Then when I restart codeblocks it disappears - I am not telling this is a solution.

Compiled C files getting no access error

I'm running the MinGW compiler (gcc port for windows). After messing around with the paths I got it running and compiled a program. Now the executable won't open. If i run it from the command line i get access denied. If i run it from windows explorer i get the same thing but in a popup. Avg is also giving me trojan reports about my own program.
I have no idea of what might be happening with your anti-virus, but I have heard from fellow programmers that antivirus can be very annoying giving false-positives these days. Anyway, check that the program that you generated is indeed giving some sort of "Access denied" error instead of "Access violation". The most likely cause is that your program can not access certain dll's that it needs to run, like libgcc_sj.dll (not really sure about the name), or even some msvcrt??.dll . The easiest way to check for the list of dll's that your program depends upon is with an utility distributed in the Window's SDK called "depends.exe".
Good luck!

Resources