Jefferson Pita Problem building first app on Windows 8
Posts 37
Added by Jefferson Pita 12 months ago

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 ==========

hex lee RE: Problem building first app on Windows 8
Posts 36
Added by hex lee 12 months ago

Hi, Jeff
Can you paste more detailed build information.

Jefferson Pita RE: Problem building first app on Windows 8
Posts 37
Added by Jefferson Pita 12 months ago

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.

Jefferson Pita RE: Problem building first app on Windows 8
Posts 37
Added by Jefferson Pita 12 months ago

Building for Win32

1.png (231 kB)

Jefferson Pita RE: Problem building first app on Windows 8
Posts 37
Added by Jefferson Pita 12 months ago

Building for ARM

2.png (174.1 kB)

hex lee RE: Problem building first app on Windows 8
Posts 36
Added by hex lee 12 months ago

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

Jefferson Pita RE: Problem building first app on Windows 8
Posts 37
Added by Jefferson Pita 12 months ago

No. It is VS 2011 beta.

Jefferson Pita RE: Problem building first app on Windows 8
Posts 37
Added by Jefferson Pita 12 months ago

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

Jefferson Pita RE: Problem building first app on Windows 8
Posts 37
Added by Jefferson Pita 12 months ago

VS 2011 - About

3.png (564.9 kB)

hex lee RE: Problem building first app on Windows 8
Posts 36
Added by hex lee 12 months ago

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)

Jefferson Pita RE: Problem building first app on Windows 8
Posts 37
Added by Jefferson Pita 12 months ago

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?

hex lee RE: Problem building first app on Windows 8
Posts 36
Added by hex lee 12 months ago

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

Jefferson Pita RE: Problem building first app on Windows 8
Posts 37
Added by Jefferson Pita 12 months ago

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!

hex lee RE: Problem building first app on Windows 8
Posts 36
Added by hex lee 12 months ago

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

Jefferson Pita RE: Problem building first app on Windows 8
Posts 37
Added by Jefferson Pita 12 months ago

Understood.

From now, I'll develop using always "char *".

Thanks for everything.


(1-14/14)