cocos 2dx version 3.15 --no-native argument not recognised - cocos2d-x

I am using cocos2dx version 3.15, python version is 2.7.12, java version is 1.8.
The problem is when i try to create a web only project
using cocos new projectName -l js --no-native command, it gives me this error:
cocos new: error: unrecognized arguments: --no-native.
Nowhere in the docs have i found that this command is deprecated/removed.
I have searched a lot for this error, but nobody seem to be getting the same error.
What may be the possible reason for this?
Thanks.

cocos new projectName -l js --no-native
Above command is used for cocos studio, as cocos studio is canceled, the command was removed. There is a PR for the same.

Related

QMSQL : Cannot mix incompatible Qt library (version 0x50b03) with this library (version 0x50c05)

I'm trying to use a MySQL database in a QT application. For this I needed to build the MySQL manually and nothing went as planned at all.
Using:
Qt 5.12.5
g++ 8.3.0
Make 4.2.1
MySQL 15.1
Debian 10.1
I first tried to follow this guide: https://doc.qt.io/qt-5/sql-driver.html but qmake wouldn't detect MySQL headers.
After searching the internet I found out somebody managed to work things out by building directly the driver.
I went in ~/Qt/5.12.5/Src/qtbase/src/plugins/sqldrivers/mysql and ran :
qmake qmake "INCLUDEPATH+=/usr/include" "LIBS+=-L/usr/lib/x86_64-linux-gnu/ -lmysqlclient_r"
It didn't work :
Project ERROR: Library 'mysql' is not defined.
After some googling, I changed the mysql.pro file to this one:
TARGET = qsqlmysql
HEADERS += $$PWD/qsql_mysql_p.h
SOURCES += $$PWD/qsql_mysql.cpp $$PWD/main.cpp
OTHER_FILES += mysql.json
PLUGIN_CLASS_NAME = QMYSQLDriverPlugin
include(../qsqldriverbase.pri)
It worked, for now. Next step, running make ! Guess what? Didn't work either.
/usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
ran qmake again without "INCLUDEPATH [...]", now I was missing mysql.h. I added manually the path to it to the Makefile. It worked.
I tried running my QT app again, still no MySQL driver.
Turned out the newly built driver was not copied in the right directory with the other ones. So I copied in Qt/5.12.5/gcc_64/plugins/sqldrivers.
Now it seems my plugin is indeed recognized by Qt but it just crashes with this error :
Cannot mix incompatible Qt library (version 0x50b03) with this library (version 0x50c05)
I don't know what to do next, can't find anything useful for this case on the internet...
Help, please?
Turned out I had another version Qt installed on my system. I don't where it came from but this issue is now solved.

Visual studio 2015 win 7 32. "cocos2d" is ambigious but still compiled and run

After follow this instruction, http://www.gamefromscratch.com/post/2014/09/29/Cocos2D-x-Tutorial-Series-Installation-Creating-a-Project-and-Hello-World.aspx
_Download and setup cocos
_Run cocos new -l cpp -p com.gamefromscratch.helloworld -d E:\4-Project\cocos\projec\helloworld helloworld
_Open visual studio solution inside proj.win32 folder.
I open cocos via visual studio on my windows 7 x64, and visual studio tell me that cocos2d namespace is ambigious. I tried to run the same project with same visual studio on windows 10, the problem disappeared. Althought project can still be run and debug perfectly fine, those red line still keep coming.
Here is my visual studio and config ( default of cocos)!
If I'm not wrong the cocos2d namespace is the "USING_NS_CC" macro and is in the HelloWorld .cpp file, you have a syntax error in the header file, to correct it:
class HelloWorld : public cocos2d::Layer
{
...
}
To create a cocos2d project and work on a desktop platform like Windows is very simple as long as you have at least the following:
Visual Studio 2012 (for Windows)
Python 2.7.5
After downloading cocos2d-x, you should open the command line (CMD) and paste the following:
python
"C:\Users\User\Downloads\folder-cocos2d-x\tools\cocos2d-console\bin\cocos.py"
new MyGame -d "C:\Users\User\Documents" -l cpp
Replacing a valid route will of course take a few minutes to create your new project
Documentation
After serveral hour unsuccess. I finally installed c++ resharper and disable visual studio IDE. The problem finally gone!

Cocos2d-x compile android cannot run program

created new cocos2d-x 3.6 project with cocos console comnand new -l cpp, all variables are set by running setup.py, then when i try to run cocos compile i get compilation errors.
log: log.txt
Cheked if there are spaces in paths but there isn't, everything is installed.
the problem is here
Execute failed: java.io.IOEx ception:
Cannot run program"D:\MyCppGame\cocos2d\cocos\platform\android\java\${
aapt}"
(in directory "D:\MyCppGame\cocos2d\cocos\platform\android\java"):
Create Process error=2, The system cannot find the file specified
You can solve it by adding some lines to the SDK/tools/ant/build.xml
https://stackoverflow.com/a/30807140

How to install cocos2d-x in windows8 and VS2013

I want to install cocos2d-x on my windows8 but i download this "http://bit.ly/18xmkJ9" from "http://cocos2d-x.org/download" in the tutorial says that i must execute a .bat in there or in some other pages says that i neet to create a project in VS, but when i try to do what they say in the tutorial i dont see anithing that is shown.
I'm very lost and help needed.
Could anybody say me hoy to createand start a project on cocos2d?
I have answer the similar question here.
Before cocos2d-x 2.1.2, you can still use templates in VS. However, you can only use python to create project
Install python 2.7
Open command line in Windows
Go to your cocos2d-x-2.1.5\tools\project-creator folder
Run create_project.py. Usage:
create_project.py -project YourProjectName -package com.example.PakcageName -language cpp
-language option:[cpp | lua | javascript]
Your project will be created in cocos2d-x-2.1.5\projects
Then find the win32.proj , open ***.sln

Qt windows libmysql.dll

I have installed MySQL 5.1.49 and the binary QT 4.6.2 for Visual Studio 2008. I configured Qt as follow:
C:\Qt>configure -static -no-webkit -plugin-sql-sqlite -plugin-sql-mysql -I C:\mysql\include -L C:\mysql\lib\optC:\Qt\src\plugins\sqldriver
Everything went fine, no errors. When I run nmake on my application everything runs fine, no errors as well. However when I execute my application under the debug folder I get a popup saying "Driver not loaded" (I have QT += sql under my project.pro)
If I goto C:\Qt\plugins\sqldrivers I dont see any libmysql, or any *mysql.dll only qsqlmysql.obj and qsqlmysqld.obj (there are files such as: qsqlite4.dll, qsqlpsql4.dll etc.)
I did try to build it manually by doing:
cd %QTDIR%\src\plugins\sqldrivers\mysql
C:\Qt\src\plugins\sqldrivers\mysql>qmake "INCLUDEPATH+=C:\mysql\include" "LIBS+=C:\mysql\lib\opt\libmysql.lib" mysql.pro
nmake
Everything compiles fine, no errors. However, I still don't find any libmysql.dll generated. Only file found is under C:\mysql\bin\libmySQL.dll
I have all the includes for MySQL under C:\mysql\include and the libraries under C:\mysql\lib\opt
Any ideas what could be the problem? Thanks
Using -static prevents you from using plugins at runtime. You will need to change
-plugin-sql-mysql
to
-qt-sql-mysql
and have it compiled in.
B1.
Have you tried using qt source instead of the binary one? I had a similar issue, however I was getting compile errors.