What did kMaxLogLen become in cocos2dx3.2? - cocos2d-x

When I'm writing "char szBuf【kMaxLogLen】;" xcode said:
Use of undeclared identifier 'kMaxLogLen'
How to fix it? I'm using cocos2dx3.2 and xcode.

It has been refactored to MAX_LOG_LENGTH and you can found in file
cocos\base\CCConsole.h

Related

CSV::MalformedCSVError: Illegal quoting in line 1 with SmarterCSV

I have an issue, when trying to process a csv file, using SmarterCSV.
The error I get is -
CSV::MalformedCSVError: Illegal quoting in line 1
This is where the code I use to process the csv file
SmarterCSV.process(file_path)
I have gone through similar questions. But no where I find a good fit that could help me.
I tried to resolve it using some options of SmarterCSV such as -
:remove_empty_values, :remove_empty_hashes etc. But in vain.
I welcome the suggestions or refactoring to make this work? Thanks all
This is due to illegal Unicode characters inside your file.
You can process file with Unicode characters with
f = File.open(file_path, "r:bom|utf-8"); data = SmarterCSV.process(f); f.close
here data will contain parsed data.
Also refer official documentation on this:https://github.com/tilo/smarter_csv#notes-about-file-encodings

How to use HaxeFlixel together with openfl-bitfive

I would like to build a HaxeFlixel project against a HTML5 target, using openfl-bitfive
In the Readme for openfl-bitfive:
https://github.com/YellowAfterlife/openfl-bitfive#usage, it says:
"Navigate to application.xml of your project and add the following
before inclusion of OpenFL library: <set name="html5-backend" value="openfl-bitfive" />"
In HaxeFlixel, there is no application.xml, and the closest thing to
it is Project.xml.
So I put in "<set name="html5-backend" value="openfl-bitfive" />" as
the first child node of the "<project>" element.
I then run the build command, and get the following error output:
$ lime build html5
/usr/lib/haxe/lib/openfl-bitfive/2,0,1/openfl/Assets.hx:487:
characters 31-57 : DefaultAssetLibrary should be openfl.AssetLibrary
/usr/lib/haxe/lib/openfl-bitfive/2,0,1/openfl/Assets.hx:487:
characters 31-57 : For function argument 'library'
/usr/lib/haxe/lib/lime/2,0,0-alpha,7/lime/system/System.hx:75:
characters 2-35 : Class<ApplicationMain> has no field config
/usr/lib/haxe/lib/lime/2,0,0-alpha,7/lime/system/System.hx:76:
characters 2-32 : Class<ApplicationMain> has no field config
/usr/lib/haxe/lib/lime/2,0,0-alpha,7/lime/system/System.hx:77:
characters 2-24 : Class<ApplicationMain> has no field create
As you can see, the openfl-bitfive library gets invoked, however,
something goes wrong, and I do not understand the error messages.
What is going wrong here?
Anyone out there who has successfully used openfl-bitfive to compile a HaxeFlixel project, please let me know how!
Libraries and versions:
$ haxelib list
flixel-addons: [1.1.0]
flixel-demos: [1.1.1]
flixel-templates: [1.0.2]
flixel-tools: [1.0.2]
flixel-ui: [1.0.2]
flixel: [3.3.5]
hxcpp: [3.1.39]
lime: [2.0.0-alpha.7]
openfl-bitfive: [2.0.1]
openfl: [2.1.5]
You don't need to set the HTML5 backend actually, it's flixel's default backend already.
However, bitfive is not yet compatible with the most recent OpenFL / Lime versions.
There are two options:
use OpenFL's default HTML5 backend via <set name="no-custom-backend" />
downgrade to openfl 2.0.1 / lime 1.0.1 / lime-tools 1.5.7
Unfortunately, openfl-bitfive: [2.0.1] is incompatible with lime: [2.0.0-alpha.7] and openfl: [2.1.5]. You need to switch back to openfl [2.0.1] for compiling with openfl-bitfive: [2.0.1].

After update of the JSON module i get the following warning

After update of the JSON module from version 1.54 to 2.07 i get the following warning in my logs:
Prototype mismatch: sub ModPerl::ROOT::ModPerl::PerlRun::mypath_myfile_2epl::from_json: none vs ($#) at mypath_myfile.pl line 6.
Prototype mismatch: sub ModPerl::ROOT::ModPerl::PerlRun::mypath_myfile_2epl::to_json: none vs ($#) at mypath_myfile.pl line 6.
Prototype mismatch: sub ModPerl::ROOT::ModPerl::PerlRun::mypath_myfile_2epl::encode_json: none vs ($) at mypath_myfile.pl line 6.
Prototype mismatch: sub ModPerl::ROOT::ModPerl::PerlRun::mypath_myfile_2epl::decode_json: none vs ($) at mypath_myfile.pl line 6.
in line 6 of myfile.pl use JSON; is called
Any ideas what's going wrong here or how to solve this issue?
Check the incompabilities between JSON 1 .x and 2.x at CPAN.
What do you include before JSON? Which modperl version are you running?
Sounds like you also need to update your JSON::XS and/or JSON::PP to a compatible version.

Strict Standards: Creating default object from empty value. What does this error message mean?

I get this error message:
"Strict Standards: Creating default object from empty value in /opt/lampp/htdocs/projects/nusoap/lib/nusoap.php on line 76 "
The code on line 76:
$GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel = 9;
What does this mean? And how can I fix it.
Looking forward to your reply
Regards
SirBT
You can set the error_reporting level to strict just before include nusoap library:
ini_set('error_reporting', E_STRICT);
require 'nusoap.php';
I fixed the problem by replacing the nusoap.php file with a an older version specifically nusoap.php 0.95.
The PHP environment I work in is: PHP 5.3.8, nusoap.php 0.95 seems to be compatible with PHP 5.3.8. My conclusion is that the: "Strict Standards: Creating default object from empty value in /opt/lampp/htdocs/projects/nusoap/lib/nusoap.php on line 76" is a compatibility issue.

Problem with conflict between mysql and math.h

The problem is that the compiler says that there is a redefinition of a function between a library that belongs to MySQL and math.h from the std library.
I have been over this for two days and I still can't figure it out.
Has this ever happened to anyone?
This is the output from the compiler
C:\mingw\bin\mingw32-make.exe all
'Building file: ../src/interfaz/ventanaconf.cpp'
'Invoking: GCC C++ Compiler'
C:\mingw\bin\mingw32-g++.exe -mms-bitfields -I"c:\dev-cpp\gtkmm\include\gtkmm-2.4"
-I"c:\dev-cpp\gtkmm\lib\gtkmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\glibmm-2.4"
-I"c:\dev-cpp\gtkmm\lib\glibmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\gdkmm-2.4"
-I"c:\dev-cpp\gtkmm\lib\gdkmm-2.4\include" -I"c:\dev-cpp\gtkmm\include\pangomm-1.4"
-I"c:\dev-cpp\gtkmm\include\atkmm-1.6" -I"c:\dev-cpp\gtkmm\include\sigc++-2.0"
-I"c:\dev-cpp\gtkmm\lib\sigc++-2.0\include" -I"c:\dev-cpp\gtkmm\include\cairomm-1.0"
-I"c:\gtk\include\gtk-2.0"
-I"c:\gtk\include\glib-2.0"
-I"c:\gtk\lib\glib-2.0\include"
-I"c:\gtk\lib\gtk-2.0\include"
-I"c:\gtk\include\pango-1.0"
-I"c:\gtk\include\cairo"
-I"c:\gtk\include\freetype2"
-I"c:\gtk\include"
-I"c:\gtk\include\atk-1.0"
-I"c:\Archivos de programa\MySQL\MySQL Server 5.0\include"
-O0 -g3 -w -c -fmessage-length=0 -MMD -MP -MF"src/interfaz/ventanaconf.d"
-MT"src/interfaz/ventanaconf.d"
-o"src/interfaz/ventanaconf.o" "../src/interfaz/ventanaconf.cpp"
In file included from c:/Archivos de programa/MySQL/MySQL Server 5.0/include/my_global.h:73,
from ../src/interfaz/../gestiondb/gestordb.h:6,
from ../src/interfaz/../gestiondb/operacionesdb.h:5,
from ../src/interfaz/ventanamodulos.h:20,
from ../src/interfaz/ventanaconf.h:27,
from ../src/interfaz/ventanaconf.cpp:1:
c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h: **In function `double rint(double)':
c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h:228: error: redefinition of `double rint(double)'
C:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h:620: **error: `double rint(double)' previously defined here**
C:\mingw\bin\mingw32-make.exe: *** [src/interfaz/ventanaconf.o] Error 1**
Thanks in advance!!!
This thread in the mysql support area seems to indicate that they've taken the definition of rint() out of their config_win.h file as of April this year (even though the patch was proposed in 2006). Are you using a version of the MySQL source newer than that?
The problem was about an included library, which linux simply ignores, but windows want out. There is no problem letting it out in linux neither...
Somedays i feel SOOOOOOOOOOOOOOOOOOOOOOO STUPID:..
In line 228 of c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h you should find a declaration/definition of function named "rint". In line 620 of C:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h you should find another definition of a function with the same name (which probably even does the same).
To solve the problem you will have to delete/outcomment/undefine one of these definitions.
Be prepared to get a similar problem when linking, if you also link two libraries with the same function.