Developers Manual > Cocos2d-x > Deprecated Docs for Cocos2d-x > Setting up Development Environments > Windows Phone 8 Environment Setup

Windows Phone 8 Environment Setup

Create a new Direct3D project at the same level as the Cocos2d-x samples in VS2012 express.
Gut the generated file and replace with the contents of cocos2dorig.cpp

Replace the pre compiled header (pch.h) with the one out of the sample like ….


#pragma once

#define _CRT_SECURE_NO_WARNINGS 1

#include “cocos2d.h”
#include <wrl\client.h>
#include <d3d11_1.h>
#include <DirectXMath.h>
#include <memory>
#include <Box2D\Box2D.h>
//#include <d2d1.h>

#define XAUDIO2_HELPER_FUNCTIONS 1
#include <xaudio2.h>
#include <xaudio2fx.h>
#include <mmreg.h>
#include <mfidl.h>
#include <mfapi.h>
//#include <mfreadwrite.h>
#include <mfmediaengine.h>


Change the project setting with…

Preprocessor
————
TIXML_USE_STL
COCOS2D_DEBUG=1

Additional include directories
——————————
./
../external
../Cocos2dWindowsPhone/include
../Cocos2dWindowsPhone/platform/third_party
../Cocos2dWindowsPhone/include/libpng
../Cocos2dWindowsPhone/include/libjpeg
../Cocos2dWindowsPhone/include/freetype
../Cocos2dWindowsPhone/include/zlib@(IntermediateOutputPath)
../CocosDenshionWindowsPhone/include

Additional library Directories
——————————
..2dWindowsPhone\libraries\\$(PlatformTarget);..(Platform)(Configuration)2dWindowsPhone;..(Platform)(Configuration)2DWindowsPhone;..(Platform)(Configuration)

Generally hack around in the new project so that it looks as close as possible to the sample and builds.

Copyright © 2010 - 2014 Cocos2d-x.org Support Email: support@cocos.org