Hi all

I am a noob to C++ and I was getting some source code off the web and this is the second time it has happened, when I compile (Blood Shed Dev) I get a message in the compiler "permission denied"
"Id returned 1 exit status"
Can anybody help me and tell me what is going wrong please?


Many thanks

HLA91

Don't know about Bloodshed, but what is the code suppose to do? Could you show it? What OS are you using?

Edited 6 Years Ago by Nick Evan: n/a

It isn't the code that's complaining, it is the linker (ld).
Most likely you are trying to write to a file that is read-only, or read or write a file that you don't have access rights to. Are you using linux?

True, the code runs fine with me (winxp home admin).
Did you ever have a simulair problem with code?

You could try changes the code one line at a time to check what the problem is?
for example change:

keybd_event((UCHAR)VkKeyScan(szMessage[nRand][i]), NULL, NULL, NULL);

in

printf("%s", szMessage[nRand][i]);

Edited 6 Years Ago by Nick Evan: n/a

No, i use XP and here is the code I was trying to use http://www.planet-source-code.com/vb/scripts/ShowCodeAsText.asp?txtCodeId=10405&lngWId=3
Also I am the admin on my pc so I should be able to do whatever I like with the files shouldnt I?

Believe what you like. Your error message is ld returned 1 exit status which explicitly means your linker is failing for some (unspecified) reason.

Check to make sure the compiler is correctly configured to use the linker.

Also, admin doesn't mean you have unfettered access. Just privileges sufficient to override access restrictions. That said, my first, off-the-cuff diagnosis was probably premature.

I have run into other code that comes up with that error here is one example, this one though comes up with
"linker error undefined reference to mciSendStringA@16" as well as the "Id returned exit 1 status", also
How do I check to make sure the compiler is correctly configured to use the linker that Duoas mentioned?

Many thanks

HLA91

>>"linker error undefined reference to mciSendStringA@16"
That is a completly different problem. It means it can not find the code to that function which is probably in a library somewhere. You need to find out what library that function is in and then add it to your project.

I have found out how to add the library (libwinmm.a) and I can link it but only on my laptop, if I try it on my desktop i get as far as project>options then a warning comes up about a bug and I am using dev C/C++ beta but on my laptop I CAN add the library and they are both running the same version, the beta version, the only difference is that my laptop is running Windows Me and my desktop is XP I dont understand it can anyone recommedn another compiler please?

Many thanks

HLA91

Allrigt.. I was having the same "id returned 1 exit status". I googled some, ended up here. Then I found out the solution for my problem. Lol. Make sure you have finished running you program in the console, the try to compile again. OP's don't usually like it when you try to write to a file that is in use you know =)

I hope this helps for some of you receiving this error.. Haha.

Allrigt.. I was having the same "id returned 1 exit status". I googled some, ended up here. Then I found out the solution for my problem. Lol. Make sure you have finished running you program in the console, the try to compile again. OP's don't usually like it when you try to write to a file that is in use you know =)

I hope this helps for some of you receiving this error.. Haha.

I was screwing around with messageboxes when the compiler gave the error. i guess it didnt destroy the window and the process was still running. thanx

Allrigt.. I was having the same "id returned 1 exit status". I googled some, ended up here. Then I found out the solution for my problem. Lol. Make sure you have finished running you program in the console, the try to compile again. OP's don't usually like it when you try to write to a file that is in use you know =)

Yeah, funny error.

I am a newbie and I got the same error here. After I read slasktratt87 post, I found out that the program is still running in the console. Hehe! =) So make sure to terminate running program first before compiling it again!

This question has already been answered. Start a new discussion instead.