@sharma_arpitC:\Qt\Tools\mingw482_32\bin\mingw32-make.exe
This is not the make that you should be using.
This probably means that you are using the wrong compiler on qt-creator.
You probably are using the official installer of qt-creator which does not have out patches to find
msys2/mingw32/bin/gcc make etc.
Please read the tutorial again
You can not drop in and out different mingw compilers from different sources as they may have different exception models
also the qt-creator you should be running will be in msys2/mingw32/bin/qt-creator.exe
Hope you Help me for this
11:20:43: Running steps for project Cocos2dx…
11:20:43: Starting: “C:\msys64\mingw64\bin\mingw32-make.exe”
[ 7%] Built target chipmunk_static
[ 18%] Built target box2d
[ 18%] Built target unzip
[ 18%] Built target tinyxml2
[ 19%] Built target xxhash
[ 20%] Built target audio
[ 69%] Built target cocos2d
[ 74%] Built target extensions
[ 81%] Built target spine
[ 87%] Built target cocosbuilder
[100%] Built target cocostudio
Linking CXX executable …\bin\arpittest\arpittest.exe
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\sqlite3\libraries\mingw32/libsqlite3.a when searching for -lsqlite3
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\sqlite3\libraries\mingw32\libsqlite3.a when searching for -lsqlite3
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\curl\prebuilt\mingw32/libcurl.a when searching for -lcurl
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\curl\prebuilt\mingw32\libcurl.a when searching for -lcurl
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\curl\prebuilt\mingw32/libcurl.a when searching for -lcurl
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find -lcurl
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\websockets\prebuilt\mingw32/libwebsockets.a when searching for -lwebsockets
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\websockets\prebuilt\mingw32/libwebsockets.dll when searching for -lwebsockets
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\websockets\prebuilt\mingw32\libwebsockets.a when searching for -lwebsockets
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\websockets\prebuilt\mingw32/libwebsockets.a when searching for -lwebsockets
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\websockets\prebuilt\mingw32/libwebsockets.dll when searching for -lwebsockets
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find -lwebsockets
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\jpeg\prebuilt\mingw32/libjpeg.a when searching for -ljpeg
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\jpeg\prebuilt\mingw32\libjpeg.a when searching for -ljpeg
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\png\prebuilt\mingw32/libpng.a when searching for -lpng
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\png\prebuilt\mingw32\libpng.a when searching for -lpng
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\webp\prebuilt\mingw32/libwebp.a when searching for -lwebp
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\webp\prebuilt\mingw32\libwebp.a when searching for -lwebp
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\tiff\prebuilt\mingw32/libtiff.a when searching for -ltiff
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\tiff\prebuilt\mingw32\libtiff.a when searching for -ltiff
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\glfw3\prebuilt\mingw32/libglfw3.a when searching for -lglfw3
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\glfw3\prebuilt\mingw32\libglfw3.a when searching for -lglfw3
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\glfw3\prebuilt\mingw32/libglfw3.a when searching for -lglfw3
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find -lglfw3
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\win32-specific\gles\prebuilt\mingw32/libglew32.a when searching for -lglew32
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\win32-specific\gles\prebuilt\mingw32\libglew32.a when searching for -lglew32
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\win32-specific\gles\prebuilt\mingw32/libglew32.a when searching for -lglew32
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find -lglew32
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\win32-specific\icon\prebuilt/iconv.dll when searching for -liconv
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\freetype2\prebuilt\mingw32/libfreetype.a when searching for -lfreetype
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\freetype2\prebuilt\mingw32\libfreetype.a when searching for -lfreetype
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\bzip2\prebuilt\mingw32/libbz2.dll.a when searching for -lbz2
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\bzip2\prebuilt\mingw32/libbz2.a when searching for -lbz2
tests\arpittest\CMakeFiles\arpittest.dir\build.make:149: recipe for target ‘bin/arpittest/arpittest.exe’ failed
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.1/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:\cocos2d-x\cocos2d-x-3.2\external\bzip2\prebuilt\mingw32\libbz2.a when searching for -lbz2
collect2.exe: error: ld returned 1 exit status
CMakeFiles\Makefile2:640: recipe for target ‘tests/arpittest/CMakeFiles/arpittest.dir/all’ failed
Makefile:75: recipe for target ‘all’ failed
mingw32-make[2]: *** [bin/arpittest/arpittest.exe] Error 1
mingw32-make1: *** [tests/arpittest/CMakeFiles/arpittest.dir/all] Error 2
mingw32-make: *** [all] Error 2
11:21:06: The process “C:\msys64\mingw64\bin\mingw32-make.exe” exited with code 2.
Error while building/deploying project Cocos2dx (kit: Desktop Qt 5.3 MinGW-w64 64bit (MSYS2))
When executing step “Make”
11:21:06: Elapsed time: 00:23.
And when use your suggested project found another error
11:50:38: Running steps for project MyGame…
11:50:38: Starting: “C:\msys64\mingw64\bin\mingw32-make.exe”
Scanning dependencies of target MyGame
[ 33%] Building CXX object CMakeFiles/MyGame.dir/proj.win32/main.cpp.obj
In file included from D:\cocos2d-x\cpp-template-default-master\cpp-template-default-master\proj.win32\main.cpp:1:0:
D:\cocos2d-x\cpp-template-default-master\cpp-template-default-master\proj.win32\main.h:11:20: fatal error: CCStdC.h: No such file or directory #include “CCStdC.h”
^
compilation terminated.
CMakeFiles\MyGame.dir\build.make:53: recipe for target ‘CMakeFiles/MyGame.dir/proj.win32/main.cpp.obj’ failed
mingw32-make[2]: *** [CMakeFiles/MyGame.dir/proj.win32/main.cpp.obj] Error 1
CMakeFiles\Makefile2:59: recipe for target ‘CMakeFiles/MyGame.dir/all’ failed
mingw32-make[1]: *** [CMakeFiles/MyGame.dir/all] Error 2
Makefile:75: recipe for target ‘all’ failed
mingw32-make: *** [all] Error 2
11:50:39: The process “C:\msys64\mingw64\bin\mingw32-make.exe” exited with code 2.
Error while building/deploying project MyGame (kit: Desktop Qt 5.3 MinGW-w64 64bit (MSYS2))
When executing step “Make”
11:50:39: Elapsed time: 00:01.
@sharma_arpit
Okay well your error here is that
mingw64 = x86_64 compiler
mingw32 = i686 compiler
So you are trying to link a 64bit library into a 32bit program.
What I don’t understand is why are you building cocos2d-x?
I have already prebuilt it for you in the 2 packages
mingw-w64-x86_64-cocos2d-x-git and mingw-w64-i686-cocos2d-x-git
So you just clone the template i have on github and open the cmakelists.txt with qt creator and it will work.
@sharma_arpit
You can’t currently do this with 2.2.1
The version is f9d770d from git.
This is near 3.3alpha
Soon I will start doing stable releases such as 3.3 3.4 etc
It could be back ported to 2.2.5 but the focus is on the v3 branch.
Someone will have to backport my cmake scripts for this.
I currently am too busy with other work todo this v2 port.
If someone wants it bad enough in the community I’m sure they will backport it
I added to the AppDelegate.cpp of a line, selected with comments #####:
#include "AppDelegate.h"
#include "HelloWorldScene.h"
USING_NS_CC;
//############################
using namespace CocosDenshion;
//############################
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
bool AppDelegate::applicationDidFinishLaunching() {
// initialize director
auto director = Director::getInstance();
auto glview = director->getOpenGLView();
if(!glview) {
glview = GLView::create("My Game");
director->setOpenGLView(glview);
}
// turn on display FPS
director->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don't call this
director->setAnimationInterval(1.0 / 60);
// create a scene. it's an autorelease object
auto scene = HelloWorld::createScene();
//##############################################################
// preload all the sound
SimpleAudioEngine::getInstance()->preloadEffect("sfx_wing.ogg");
//##############################################################
// run
director->runWithScene(scene);
return true;
}
// This function will be called when the app is inactive. When comes a phone call,it's be invoked too
void AppDelegate::applicationDidEnterBackground() {
Director::getInstance()->stopAnimation();
// if you use SimpleAudioEngine, it must be pause
// SimpleAudioEngine::getInstance()->pauseBackgroundMusic();
}
// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground() {
Director::getInstance()->startAnimation();
// if you use SimpleAudioEngine, it must resume here
// SimpleAudioEngine::getInstance()->resumeBackgroundMusic();
}
After that the linker gives out the following error:
D:/DEVELOPMENT/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../lib/libaudio.a(MciPlayer.cpp.obj):(.text+0x73): undefined reference to `__imp_mciSendCommandA'
@Martell
I got this when trying to install step 2
/mingw64/lib/libprotobuf.a exists in both ‘mingw-w64-x86_64-protobuf’ and ‘mingw-w64-x86_64-cocos2d-x-git’
Errors occurred, no packages were upgraded.
Hi @siauw,
That package is quite old at the time protobuf was compiled into the cocos2d-x package
you can pass --force to pacman to make it install over the official protobuf package.
I actually have some free time today as I’m updating packages so I will see if I can build a 3.6 package.
everything is setup now, i can generate codeblocks project, but got this error
c:\mydir\cocos2d\cocos\base\CCConsole.h|114|error: ‘ssize_t’ does not name a type|
any clues?
I tried using mingw gccc 4.8.2 and mingw64 5.1, same error
I created a new topic for this