Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 994209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:32:31+00:00 2026-05-16T06:32:31+00:00

This is what I get when trying to compile a simple hello world program

  • 0

This is what I get when trying to compile a simple hello world program with gcc.

c:\>gcc hello.c
hello.c:9:2: warning: no newline at end of file
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot open output file a.exe
: Permission denied
collect2: ld returned 1 exit status

Does it have something to do with windows 7 administrative privileges?

If the output file is being created but cannot be opened, where is it located?

Sorry if this is too much of a noobie question. I have been using Dev-C++ for compiling my source code till now. I tried googling around the error but all i could find was the file is already open, but there is no mention of such exe in task manager.

Edit: Also the file is located at C:\hello.c

Will i be able to do it if i place it in other drive?

When i place the file at D:\ and try change it to any other drive using cd d:\ doesn’t change the drive.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:32:32+00:00Added an answer on May 16, 2026 at 6:32 am

    Yes it is a permissions issue, you must not be running the command line window in Admin mode.

    Don’t work in C:\

    Copy the file to a folder under my documents, or a subfolder of C:, or another drive.

    Or, run the console in Administrator mode if you really want to work in the root of C:

    To switch to D: while in C:, just type D: (you use CD only when already on the correct drive)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 495k
  • Answers 495k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In order to see an icon in the live wallpaper… May 16, 2026 at 11:13 am
  • Editorial Team
    Editorial Team added an answer Essentially type safety and convenience. Java implements its generics by… May 16, 2026 at 11:13 am
  • Editorial Team
    Editorial Team added an answer Like edorian already showed, getting the namespace works fine when… May 16, 2026 at 11:13 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am trying to compile this .c code in windows using MinGW (gcc file.c
I am just trying to compile and run a very simple test program, but
I'm trying to get a simple mixture between Managed C++ and plain C++ working.
I've installed Haskell via the pre built installer v6.8.2. When trying to compile this
I'm trying to create a (very) simple Win32 GUI program, but for some reason
This is the error I'm getting when trying to compile some code that uses
I am trying to compile my first c++ file on windows with the g++
I have a url that look like this reg.php?lang=no_NO&passkey=test and im trying to get
I'm trying to learn the basics of tying up unmanaged C++ and .NET. So,
I know this is a common error, but bear with me. I've pursued the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.