problems compiling example with msvc 2010 express

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
esi
Posts: 3
Joined: Tue Jul 13, 2010 12:02 am

problems compiling example with msvc 2010 express

Post by esi »

Hello,
I am trying to compile irrlicht example 1 hello world with visual studio express 2010.
It is the free c++ express download from Microsoft, help -> about shows the following version info:
Microsoft Visual Studio 2010
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.0.30319 RTMRel
Installed Version: VC Express

1) Problem compiling original project files:
I open this file : HelloWorld.sln
In "Solution Explorer" view, i right click on the project "01.HelloWorld" - project only - rebuild and get this error:
------ Rebuild All started: Project: 01.HelloWorld, Configuration: Debug Win32 ------
main.cpp
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(G:\irrlicht\examples\01.HelloWorld\.\Debug\01.HelloWorld.exe) does not match the Linker's OutputFile property value (G:\irrlicht\bin\Win32-VisualStudio\01.HelloWorld.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
HelloWorld.vcxproj -> G:\irrlicht\examples\01.HelloWorld\.\Debug\01.HelloWorld.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

I can bypass problem 1 by creating a new empty project as follows:

If I start a new project - empty project
project - add new item - cpp file : main.cpp
and paste the contents of the original source code from the 01.Helloworld main.cpp, then everything will build
without error but not run.

2) Problem running compiled programs:
When I try to run I see the outlines of a window appearing and disappearing very quickly.
also the newly compiled exe file will be smaller than the originals that work.
The precompiled examples all work well on my machine, so its not a configuration problem with my machine.

I am running winxp(32 bit) with all latest patches.

I have also tried compiling with both debug and release setting and both give same problem.
Can anyone tell me if this works for others or suggest what else I could try ?
What is the best compiler to use, I would be happy to use another one.
Rgds, esi.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Hmm. Are you sure your computer is within the system requirements? You'll need xp fully updated to service pack 3, and it can't be starter edition.
esi
Posts: 3
Joined: Tue Jul 13, 2010 12:02 am

Post by esi »

Dear Ducky, thx for reply.
What are the requirements, can you post a link ?
But yes I have sp3(all patches) and xp professional.
Rgds, esi.
esi
Posts: 3
Joined: Tue Jul 13, 2010 12:02 am

Post by esi »

I just tried the Code::Blocks compiler.
Worked like a charm without any hassle.
I would advice other newcomers to stay away from msvc due to bugs and compatibility issues for the time being at least with this new version (2010 express)
I also had problems trying to build other projects with msvc and had to give up on those as well.
Best regards, esi.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

I've had no problems with 2008, have you tried that?
Ion Dune
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA
Contact:

Post by Ion Dune »

I'm with Lonesome Ducky, been using the 2008 one for quite so time with no issues. Installed 2010 for about 5 minutes - now switching back to 2008.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I suppose a lot of people will switch to VS 2010 now, so we will have to switch to that (and kick VS 2003 support). Just not found time for it yet.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

esi wrote:I just tried the Code::Blocks compiler.
Worked like a charm without any hassle.
I would advice other newcomers to stay away from msvc due to bugs and compatibility issues for the time being at least with this new version (2010 express)
I also had problems trying to build other projects with msvc and had to give up on those as well.
Best regards, esi.
I've worked with MSVC for years and have been using 2010 since it came out. It's a good compiler, and the new auto-fill features and Intellisense in MSVC 2010 can be really helpful. Don't knock it just becaues you had problems.
Mikhail9
Posts: 54
Joined: Mon Jun 29, 2009 8:41 am

Re: problems compiling example with msvc 2010 express

Post by Mikhail9 »

esi wrote: I can bypass problem 1 by creating a new empty project as follows:

If I start a new project - empty project
project - add new item - cpp file : main.cpp
and paste the contents of the original source code from the 01.Helloworld main.cpp, then everything will build
without error but not run.
Why not just configure the compiler properly and move on? VC++2010 Express works just fine for Irrlicht projects. The .sln files are somewhat stale, but the settings are easy to fix if you understand the tool you are using.

I understand this is the beginner's forum, and things like this can be frustrating. Take it as an opportunity to learn more about VC++. The settings make sense once you read the documentation. Give it a shot.
Post Reply