Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] MinGW installation problem need help

Status
Not open for further replies.

vead

Full Member level 5
Full Member level 5
Joined
Nov 27, 2011
Messages
285
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
india
Activity points
3,815

Attachments

  • diagram 1.jpg
    diagram 1.jpg
    18.4 KB · Views: 365
  • diagram 2.jpg
    diagram 2.jpg
    58.9 KB · Views: 225
  • diagram 3.jpg
    diagram 3.jpg
    32.8 KB · Views: 230

I would expect a different order on the command arguments issued from what you did, as :

Code:
gcc hello.c -o hello

I tried that command but its not working. Showing same error
 

The most likely suspect...don't use directories with spaces in them Mr embedded is probably the issue. work with your code in a directory that has no spaces.
 

The most likely suspect...don't use directories with spaces in them Mr embedded is probably the issue. work with your code in a directory that has no spaces.

Mr embedded is my system name. I don't think it does matter. I think there may be problem in path variable. if you see given link there is step for path variable. but when I click on edit button I don't see new window
 

gcc is executed, obviously the path is O.K. (unless you're starting a different gcc instance than the intended in mingw bin directory).
 


The above error message clearly indicates the OS is finding the gcc.exe executable just fine. What the OS is not finding is the hello.c file on your desktop.

Execute the following command and post results:

Code:
gcc -v

BigDog
 

The above error message clearly indicates the OS is finding the gcc.exe executable just fine. What the OS is not finding is the hello.c file on your desktop.

Execute the following command and post results:

Code:
gcc -v

BigDog
I have attached result please look at image
 

Attachments

  • diagram4.jpg
    diagram4.jpg
    108.7 KB · Views: 225

I've examined the results and compared your results with mine.

The only major difference, apart from the make and version number, is the COLLECT_GCC environmental variable:

yours
Code:
COLLECT_GCC=gcc

mine
Code:
COLLECT_GCC=C:\MinGW\bin\gcc

Although, I doubt that is the issue. What is the specific location, i.e., directory path, of your hello.c file?


BigDog
 

I've examined the results and compared your results with mine.

The only major difference, apart from the make and version number, is the COLLECT_GCC environmental variable:

yours
Code:
COLLECT_GCC=gcc

mine
Code:
COLLECT_GCC=C:\MinGW\bin\gcc

Although, I doubt that is the issue. What is the specific location, i.e., directory path, of your hello.c file?


BigDog

directory path C:\MinGW\bin I have created hello.c file on desktop
 

Please execute the following command from the command window:

Code:
dir -l hello.c

Post a screen capture of the result.

BigDog

This is screen shot
 

Attachments

  • diagram 5.jpg
    diagram 5.jpg
    41.3 KB · Views: 227

Obviously, the hello.c file is either not located in the current directory:

Code:
C:\Users\Mr Embedded\

Or the full file name is NOT:

Code:
hello.c

Execute the command:

Code:
dir /p

Carefully look for the C source file, double check there is not an extra extension like, hello.c.txt.

If no file is found in the current directory you will need to locate the specific directory which contains the C source file and then CD to the proper directory.

By the way, the current command window is not currently in the Desktop directory.

BigDog
 
  • Like
Reactions: vead

    vead

    Points: 2
    Helpful Answer Positive Rating
Carefully look for the C source file, double check there is not an extra extension like, hello.c.txt.

BigDog

Problem resolved, There was wrong file hello.c.txt. I have corrected it. Now I can compile program
Thank you very much BigDog
 

Problem resolved, There was wrong file hello.c.txt. I have corrected it. Now I can compile program

Unfortunately, it is a common issue encountered on Windows OS environments, users open source files in text editors like Notepad which add the txt extension to the file by default when saved.

BigDog
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top