Skip to main content
GameDev.net gamedev.net
🔒 Locked

Dev-C++ and Vista Compatibility

Started by Dollar00 Jul 24, 2006 at 8:55 PM 13 replies 16.1k views
Original Post
Dollar00
Dollar00
In short: I'm running Windows Vista Beta 2 and receive compiler errors when I attempt to compile any programs that were made with the help of Beginning Game Programming by Michael Morrison. Any suggestions? Or what is another suitable compiler? In detail: I've installed Windows Vista Beta 2 and had no problems installing Dev-C++ (Version 4.9.9.2). However, when I attempt to compile any of my programs, which use the game engine code from Beginning Game Programming by Michael Morrison, a compiler error results. The Compiler states: " C:\Dev-Cpp\BounceBack\Makefile.win [Build Error] [Bitmap.o] Error 1 " The Compile Log states: "Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\BounceBack\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\BounceBack\Makefile.win" all g++.exe -c Bitmap.cpp -o Bitmap.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" g++.exe: installation problem, cannot exec `cc1plus': No such file or directory make.exe: *** [Bitmap.o] Error 1 Execution terminated" I have tried running Dev-C++ as an administrator and running it in compatibility mode with Windows XP SP2, but I always receive the same error. By the way, it worked fine on Windows XP. (I have linked my project to the libwinmm.a and libmsimg32.a libraries. Also, I have included the missing code in Dev-C++'s windows.h file that Michael Morrison points out.) I realize that Vista is a beta, but can anyone please help me? If you don't have a solution, do you know of any similar C++ (I'm also using the Windows API if that matters) compilers. I like how the text editor and compiler are combined in Dev-C++.
Sol462
Sol462
My only suggestion is to switch to Visual C++. I'm sure that the Express edition would work with Vista.
Though there is a slight learning curve, it shouldn't be too bad.
Dollar00
Dollar00
I tried that. I believe it was Visual Studio 2005 Express (or something like that) and it's FAQ stated it would work with Vista. But everytime I attempted to install it, it had an error that said I wasn't running the newest version of Windows XP (SP2). Duh...I was running Vista. I couldn't get it to work in compatibility mode either so I gave up. Now, I'm back to getting Dev-C++ to work.

I also tried Borland's compiler, but I couldn't figure out how to compile my files since I had more than one. It also came up with a bunch of warnings regarding the files Michael Morrison had provided. I also don't like Borland very much because it doesn't include a text editor. I used gVim, but it's not the same as Dev-C++'s build in text editor.
Promit
Promit
It sounds like your Dev installation might be blown. More than that, I cannot say.

More importantly, why are you trying to use Vista as a dev box if you don't absolutely have to? I work at Microsoft and even we're freaking scared of doing anything except playing around in Vista.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Dollar00
Dollar00
Well, I enjoy using Vista. Up till recently, I have had no reason to get rid of it. Also, I'd have to install Windows 98 and then upgrade that to Windows XP because I only have the Windows XP upgrade edition. It's just a lot of work and work that I don't really want to do, since for the most part Vista is working great. I see your point though, but if anyone could please help I would really appreciate it. Has anybody solved this on their computer running Vista?
Colin Jeanne
Colin Jeanne
Since I run Vista every day I can tell you from experience that VC++ Express should install. I dont use Dev-C++ but that should work fine as well.

The problem is likely that you dont have permission to write to that directory (since it's not in a folder a normal account has access to). Try creating the project in your Documents folder.

And dont listen to Promit, not everyone is afraid of running Vista at MS. My team pretty much requires that XP not be used and, for the most part, there arent too many problems. At least none that should cause this.
Dollar00
Dollar00
That's what I thought also. I tried setting the entire Dev-C++ folder's priveleges (and all of its files) to full control for "Users". I also run Dev-C++ as an administrator. So I should have full control and be able to write. I will try that though. Thanks.


EDIT:
I tried to install Microsoft Visual C++ Express 2005 (from http://msdn.microsoft.com/vstudio/express/visualc/download/) again and I still get the same error about my not having Windows XP SP2.

Here is the error in detail:

Setup states it is "loading installation components". Then about 2/3s of the way through a dialogue box pops up saying the following:
"Setup has detected that this computer does not meet minimum requirements. All required prerequisites must be installed and configured before you can continue with Microsoft Visual C++ 2005 Express Edition - ENU Setup.

"Required Prerequisites [underlined]
"Windows XP Service Pack 2 Update Information [A link to info about how to upgrade to SP2]
"You must install this service pack to complete installation. Visual Studio requires that this service pack be installed before you install Visual Studio."

Then my only option is to exit setup.

Any ideas or suggestions about this?

EDIT2:

After somebody said that it sounds like a bad installation. I got an idea. Although I've already uninstalled and reinstalled Dev-C++ at least 4 times, this time I ran the setup file in compatibility mode with Windows XP SP2. Sadly, it still doesn't work....

Also, I tried putting my program in the Documents folder and it still won't compile.

[Edited by - Dollar00 on July 24, 2006 11:01:59 PM]
Adam Hamilton
Adam Hamilton
You may have tried this or maybe Dev C++ does this already but maybe the PATH settings are pointing to the wrong directory. It may be a good idea to check this out

Hope this helps

Edit: Just looked back at your first posting and make is running so your PATH does seem to be correct. Have you made sure cc1plus.exe is available

This maybe really dumb (but dumb things have been known to work in Betas) but try renaming the cc1plus.exe to cc1plus. (no extension) and see if that works

Cheers.
clauchiorean
clauchiorean
If you want to install VS Express 2005 on Vista
you should try a beta of this program if you can find one now.
I don't know but i think that the .net framework which comes with Vista beta 2 it's still beta.
Promit
Promit
Quote:
Original post by Colin Jeanne
And dont listen to Promit, not everyone is afraid of running Vista at MS.
Basically everyone in Games and Xbox I've talked to avoids it entirely. You guys of course can't very well ignore Vista, but while large numbers of people are dogfooding it, not too many people actually trust it.

But yeah, VS definitely works fine on Vista. I wonder what's wrong.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Dollar00
Dollar00
Quote:
Original post by Adam Hamilton
You may have tried this or maybe Dev C++ does this already but maybe the PATH settings are pointing to the wrong directory. It may be a good idea to check this out

Hope this helps

Edit: Just looked back at your first posting and make is running so your PATH does seem to be correct. Have you made sure cc1plus.exe is available

This maybe really dumb (but dumb things have been known to work in Betas) but try renaming the cc1plus.exe to cc1plus. (no extension) and see if that works

Cheers.


I can't seem to find cc1plus. I did a search but nothing came up. Does anybody know where this file is?

In case it matters. This is what the Makefile.win looks like. (I don't know how to set code off in its own separate box, so I used the [ quote ] thing.)

Quote:

# Project: BounceBack
# Makefile created by Dev-C++ 4.9.9.2

CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES = Bounce_private.res
OBJ = Bitmap.o GameEngine.o BounceBack.o Sprite.o $(RES)
LINKOBJ = Bitmap.o GameEngine.o BounceBack.o Sprite.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -mwindows ../lib/libwinmm.a ../lib/libmsimg32.a
INCS = -I"C:/Dev-Cpp/include"
CXXINCS = -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"
BIN = BounceBack.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
RM = rm -f

.PHONY: all all-before all-after clean clean-custom

all: all-before BounceBack.exe all-after


clean: clean-custom
${RM} $(OBJ) $(BIN)

$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "BounceBack.exe" $(LIBS)

Bitmap.o: Bitmap.cpp
$(CPP) -c Bitmap.cpp -o Bitmap.o $(CXXFLAGS)

GameEngine.o: GameEngine.cpp
$(CPP) -c GameEngine.cpp -o GameEngine.o $(CXXFLAGS)

BounceBack.o: BounceBack.cpp
$(CPP) -c BounceBack.cpp -o BounceBack.o $(CXXFLAGS)

Sprite.o: Sprite.cpp
$(CPP) -c Sprite.cpp -o Sprite.o $(CXXFLAGS)

Bounce_private.res: Bounce_private.rc BounceBack.rc
$(WINDRES) -i Bounce_private.rc --input-format=rc -o Bounce_private.res -O coff

Dollar00
Dollar00
Quote:
Original post by clauchiorean
If you want to install VS Express 2005 on Vista
you should try a beta of this program if you can find one now.
I don't know but i think that the .net framework which comes with Vista beta 2 it's still beta.


Does anybody know of where to get a beta of VC++ Express 2005? I will try that, but I still don't know why it won't work. Somebody else said they have their VC++ Express working fine with Vista.
Adam Hamilton
Adam Hamilton
Hi Dollar00

Just a follow up on that cc1plus.exe problem you have, I have found a link that may help you out.
DJGPP FAQ

Good luck.
Dollar00
Dollar00
Yes! I got it to work with Vista finally!! I think.

For others who may have this problem:
In short:
Dev-C++ has to have full priveleges for writing and the cc1.exe and cc1plus.exe files had to be located in the same folder as the g++.exe file.


Full explanation:
Here is what I did. I can't explain exactly why it works, but I can compile my programs. I changed them a little too and they definately are compiling correctly. I just hope this keeps up and I don't have to figure out more modifications. For example, when I attempt to OpenGL later on.

1a. You have to run Dev-C++ as an Administrator (or see 1b). Either right-click on Dev-C++ every time you run it and choose "Run as an Administrator" or right-click on it and go to Properties. Then go to Compatability and check the last box: "Run as an Administrator". This is because an Administrator has special priveleges that allow for the writing (creating) of files. Specifically, you won't be able to create the Makefile.win if you don't do this.

1b. Here is another choice if you don't want to run as administrator. Right-click on the Dev-Cpp folder and go to Properties. Then go to Security. Click Edit. Select "Users (*PCNAME*\Users)" and select Full-Control. Select OK.

2. Go to the following directory: ...Dev-Cpp\libexec\gcc\mingw32\3.4.2. Copy the cc1.exe and cc1plus.exe files. Now go to this directory: ...Dev-Cpp\bin. Paste those two files. NOTE: You may eventually have to paste more files in there. But this has worked for me in the little that I've used it so far. I am just using it to do C++ and Windows programming though.

3. You're done. It should compile correctly now.

Thanks for the help. I'll post back if I encounter more problems.

EDIT:
Now I am having a different problem. I can't compile C++-only programs, such as the Hello World program or examples included with Dev-C++. However, I can compile my C++ programs that use the Windows API. The compiler logs the following error (basically crt2.o cannot be found):

"Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Dev-Cpp\Examples\Hello\Hello.cpp" -o "C:\Dev-Cpp\Examples\Hello\Hello.exe" -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" -L"C:\Dev-Cpp\lib"
ld: crt2.o: No such file: No such file or directory

Execution terminated"

I tried placing crt2.o with the g++.exe file like I did with the others, but it has the same problem. Hmm... I mean it doesn't bother me yet because *my* programs still run fine. But, does anybody have any ideas?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.