C:\Users\Administrator\Des
C:\MinGW\bin\..\
d -lglibc
collect2: ld returned 1 exit status
C:\Users\Administrat
Main Topics
Browse All TopicsI'm trying to start programming in C, and I have some sample source code that I know should be good. It is in the code section below.
When I try to compile it using MinGW, using the commands below, it fails as shown below. I put C:\MinGW\bin\ in the path so I could do this with the desktop as the current directory. I used the autoinstaller "MinGW-5.1.4.exe" to install it. Any ideas how to fix the error message shown below, and get it to compile?
---Command Window---
C:\Users\Administrator>cd desktop
C:\Users\Administrator\Des
Volume in drive C has no label.
Volume Serial Number is ####-####
Directory of C:\Users\Administrator\Des
08/30/2009 01:35 AM <DIR> .
08/30/2009 01:35 AM <DIR> ..
08/25/2009 10:41 AM 2,007 Classes.lnk
08/28/2009 05:01 PM 32,098 homework0fa09.pdf
08/30/2009 02:18 PM 155 myFile.c
...
4 File(s) 35,802 bytes
8 Dir(s) 107,238,281,216 bytes free
C:\Users\Administrator\Des
C:\Users\ADMINI~1\AppData\
reference to `__mingw_vprintf'
collect2: ld returned 1 exit status
C:\Users\Administrator\Des
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If you want to use MinGW, may I recommend a very nice IDE called Dev-C++ ?
http://www.bloodshed.net/d
Just install that - it will install MinGW automatically, and will configure your system the way it should be.
Then just open the .c file in Dev-C++, and build it.
why don't you try Code::Blocks IDE ?
Code::Blocks is very user friendly with good look and feel and comes with mingw compiler
http://www.codeblocks.org/
Business Accounts
Answer for Membership
by: jkrPosted on 2009-08-30 at 12:12:15ID: 25218815
That's a liker error, try
gcc -std=c99 myFile.c -lglibc -o myFile.exe