944,156 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 119067
  • C++ RSS
You are currently viewing page 1 of this multi-page discussion thread
Jan 6th, 2006
0

Dev-C++ - [Build Error] [main.o] Error 1

Expand Post »
Hi again everyone, Im running into big trouble with my compiler Dev-C++, every time i compile any project, whether it is 1 im working on, or a completely fresh 1 I get the same error every single time, I have been on the bloodshed forums and IRC channel but Im not getting anywhere with it...I am interested in working with Windows Programming in C/C++ at the moment and every project I try to compile gives the same error...

C++ Syntax (Toggle Plain Text)
  1. C:\Dev-Cpp\Current_Project\Makefile.win [Build Error] [main.o] Error 1

and this is my compile log

C++ Syntax (Toggle Plain Text)
  1. Compiler: Default compiler
  2. Building Makefile: "C:\Dev-Cpp\Current_Project\Makefile.win"
  3. Executing make...
  4. make.exe -f "C:\Dev-Cpp\Current_Project\Makefile.win" all
  5. g++.exe -D__DEBUG__ -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -pg -g3
  6.  
  7. The system cannot find the path specified.
  8.  
  9. make.exe: *** [main.o] Error 1
  10.  
  11. Execution terminated

I have tried many times re-installing the program aswell as re-configuring it and installing with fresh configurations etc...nothing seems to work, I get the same error over and over again...anyone know why or how to overcome it ?
Reputation Points: 23
Solved Threads: 5
Posting Whiz in Training
bops is offline Offline
214 posts
since Aug 2005
Jan 6th, 2006
0

Re: Dev-C++ - [Build Error] [main.o] Error 1

might be a dumb question -- but did you check your computer to see if those -I<path> paths actually exist?
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
Jan 6th, 2006
0

Re: Dev-C++ - [Build Error] [main.o] Error 1

Is C:\Dev-Cpp\bin in your path?
Quote ...
C:\Test\GnuC>path
PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C;\icc\bin;C:\Dev-Cpp\bin;C:\BC5\BIN;C:\watcom\BINNT;C:\watcom\BINW;c:\Perl\bin;C:\Program Files\ActiveState Komodo 3.1\;C:\Program Files\Common Files\GTK\2.0\bin;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\Autodesk\DWG TrueView\;..\tool;C:\Program Files\doxygen\bin;C:\Program Files\Subversion\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\Program Files\Microsoft Visual Studio\Common\IDE\IDE98;C:\Program Files\vslick\win;C:\NECTOOLS\BIN;..\tool;C:\COSMIC\EVAL08;c:\nectools32\bin;
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Jan 6th, 2006
0

Re: Dev-C++ - [Build Error] [main.o] Error 1

Yes I have checked all of the paths and they all exist...this even happens when I compile a project from scratch..ie...

C++ Syntax (Toggle Plain Text)
  1. C:\Dev-Cpp\New_Project\Makefile.win [Build Error] [main.o] Error 1

C++ Syntax (Toggle Plain Text)
  1. Compiler: Default compiler
  2. Building Makefile: "C:\Dev-Cpp\New_Project\Makefile.win"
  3. Executing make...
  4. make.exe -f "C:\Dev-Cpp\New_Project\Makefile.win" all
  5. gcc.exe -c main.c -o main.o -I"C:/Dev-Cpp/include"
  6.  
  7. The system cannot find the path specified.
  8.  
  9. make.exe: *** [main.o] Error 1
  10.  
  11. Execution terminated

>Dave what do you mean by is C:\Dev-Cpp\bin in my path ? and what is all of that within the code box? I thought it may have come from command prompt or something like that so i tried typing...

C++ Syntax (Toggle Plain Text)
  1. C:\>path
  2. PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
  3.  
  4. C:\>
I dont have a clue what any of that is for, could you explain it? thanks.
[/CODE]
Reputation Points: 23
Solved Threads: 5
Posting Whiz in Training
bops is offline Offline
214 posts
since Aug 2005
Jan 6th, 2006
0

Re: Dev-C++ - [Build Error] [main.o] Error 1

I'm asking you what I think your make utility is asking you. Does it know where to look for g++?

The stuff in the box is a copy of my result when I execute the path command in a command shell. It is telling me that the path to g++ is indeed available to my system. Yours tells you this is not so.

When you install Dev-Cpp, do you need to reboot to update the path? (It's been so long since I've done this that I forget.)
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Jan 6th, 2006
0

Re: Dev-C++ - [Build Error] [main.o] Error 1

>>When you install Dev-Cpp, do you need to reboot to update the path?

I think it depends on which version of Windows is running. W2K/XP, definitely not. Win95/98/ME, I'm not sure either (I never used ME)
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
Jan 6th, 2006
0

Re: Dev-C++ - [Build Error] [main.o] Error 1

Oh right...Im running windows xp professional with sp1, im never prompted to reboot or anything like that, it has always worked perfect until now, im continuously getting these errors...yes g++.exe is in the c:\Dev-Cpp\bin\ directory...do you have any suggestions on what i should do?
Reputation Points: 23
Solved Threads: 5
Posting Whiz in Training
bops is offline Offline
214 posts
since Aug 2005
Jan 6th, 2006
0

Re: Dev-C++ - [Build Error] [main.o] Error 1

Add c:\Dev-Cpp\bin\ to your path. Reboot.

(But it does appear to find the make utility, which I would assume is in the same directory, so I'm reaching for straws.)
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Jan 6th, 2006
0

Re: Dev-C++ - [Build Error] [main.o] Error 1

Quote originally posted by Dave Sinkula ...
Add c:\Dev-Cpp\bin\ to your path. Reboot.

(But it does appear to find the make utility, which I would assume is in the same directory, so I'm reaching for straws.)
I use XP Pro too.

you might also check the length of the PATH environment variable. On my computer it's so long that there isn't any room left to add more. So I have a batch file to truncate the PATH to bare necessity so that I can run other command-line programs from command prompt.

Look at the end of the PATH as shown in command prompt -- if the last path isn't all there, then you probably have to same problem that I do.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
Jan 6th, 2006
0

Re: Dev-C++ - [Build Error] [main.o] Error 1

Quote ...
you might also check the length of the PATH environment variable. On my computer it's so long that there isn't any room left to add more. So I have a batch file to truncate the PATH to bare necessity so that I can run other command-line programs from command prompt.
You can change this. I've forgotten how I did it, but I ran into the same problem. Increasing the enviroment size fixed it.

I think it's a parameter to command.com in config.sys.
Reputation Points: 185
Solved Threads: 28
Posting Whiz in Training
dwks is offline Offline
269 posts
since Nov 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Sentinel & Count Help
Next Thread in C++ Forum Timeline: Does file access time work in windows 7





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC