Forum > C++ > Problem building first app on Windows 8

Problem building first app on Windows 8

By jeffersonpita Posted 2012-05-30 17:14 Comments 14
jeffersonpita
  • Posts: 39

Hello guys!

It’s my first time with Windows 8 and Visual Studio and I was following this tutorial:

http://cocos2d-x.org/projects/cocos2d-x/wiki/How\_to\_create\_a\_new\_project\_for\_windows8\_metro

Everything went ok, but what should I do to run the app?

NOTE:
I’ve already tried “Debug~~>Start Debugging", and "Build~~> Build HelloWorld”, but I’ve got:

Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped

lihex
  • Posts: 39

#1 RE: 2012-05-31 03:20

Hi, Jeff
Can you paste more detailed build information.

jeffersonpita
  • Posts: 39

#2 RE: 2012-05-31 12:27

I’ll send you a print screen.

I’ve done what is written in “http://cocos2d-x.org/projects/cocos2d-x/wiki/How\_to\_create\_a\_new\_project\_for\_windows8\_metro”.
After all, when I build the project, it shows me this error:

Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped

I think, I supposed to set some build settings just like in eclipse. Sorry, but I’m newbie in .Net Framework.

jeffersonpita
  • Posts: 39

#3 RE: 2012-05-31 12:34

Building for Win32

1.png (231 kB)

jeffersonpita
  • Posts: 39

#4 RE: 2012-05-31 12:35

Building for ARM

2.png (174.1 kB)

lihex
  • Posts: 39

#5 RE: 2012-05-31 14:47

hi jefferson
It seems like you are using visual studio 2010 ?
if so ,you should use visual studio 2011 beta.
since only vs2011 can develop win8 metro app.
Hope that helps

jeffersonpita
  • Posts: 39

#6 RE: 2012-05-31 14:56

No. It is VS 2011 beta.

jeffersonpita
  • Posts: 39

#7 RE: 2012-05-31 15:12

I think I could be in a different place in .Net Framework.

jeffersonpita
  • Posts: 39

#8 RE: 2012-05-31 15:19

VS 2011 - About

3.png (564.9 kB)

lihex
  • Posts: 39

#9 RE: 2012-05-31 16:01

hi,jeff
Your snapshot tells us you are using vs2011 develop preview version, not vs2011 beta.
You’d better download and install vs2011 ultimate beta on MS site, it will save you a lot of trouble.
Here is my vs about:

vs_about.PNG (58.6 kB)

jeffersonpita
  • Posts: 39

#10 RE: 2012-05-31 20:22

Thanks in advance!

I installed the beta version and the helloworld app works!

But, when I’ve put a more complex app, I found out some problems with Box2D.
Is Box2D working in windows 8 cocos2d-x version?

lihex
  • Posts: 39

#11 RE: 2012-06-01 02:31

Yes ,cocos2dx-win8 supports box2d.
You can build the tests project and run Box2dTest to check it.

jeffersonpita
  • Posts: 39

#12 RE: 2012-06-01 13:45

Yeah. It works!
Great job of all of you.

When I’ve ported an android project to windows 8, I’ve got problems with the “string” type.
Is there a solution for this? Or should I change all to “char *”?

Thanks at all!

lihex
  • Posts: 39

#13 RE: 2012-06-01 17:38

Hi, jeff
There are 2 function in CCCommon.cpp may help you to deal with string:
1. std::wstring CCUtf8ToUnicode(const char * pszUtf8Str)
2. std::string CCUnicodeToUtf8(const wchar_t* pwszStr)

BTW, There is a Platform::String Class in win8metro platform,
see http://msdn.microsoft.com/en-us/library/windows/apps/hh755812(v=vs.110).aspx

jeffersonpita
  • Posts: 39

#14 RE: 2012-06-01 18:39

Understood.

From now, I’ll develop using always “char *”.

Thanks for everything.

Loggin to reply

Copyright © 2010 - 2013 Cocos2d-x.orgClustrmaps