I am working on the lwIP stack with the ATSAMV71 microcontroller.
I would like to configure the lwIP stack in PPPoS mode using a TCP/IP connection.
Will you please help me to know,
What is required #define the configurations required to put the lwIP stack into PPPoS mode?
/*
---------------------------------
---------- PPP options ----------
---------------------------------
*/
#define PPP_SUPPORT 1
#define PAP_SUPPORT 1
#define LWIP_DNS 1
/*
---------------------------------
--------- GPRS options ----------
---------------------------------
*/
#define GPRS_DEBUG LWIP_DBG_OFF
#define GPRS_SUPPORT 1
#define GPRS_TYPE 1
#define GPRS_OWNTHREAD 1
#define GPRS_THREAD_NAME "pppos"
#define GPRS_RUNTIME_APN 1
#define GPRS_RUNTIME_PIN 1
#define GPRS_COMMAND_DELAY 500
#define GPRS_ICCID 1
#define GPRS_THREAD_STACKSIZE 512
#define GPRS_THREAD_PRIO 2
#define GPRS_PPPIF_NAME_0 'P'
#define GPRS_PPPIF_NAME_1 '0'
I am trying to cross-compile a .go file for the GTK binding package Linux => Windows and can't figure it out. Tried going the route of setting up MSYS on Win but it was god-awful.
I looked for a Docker image but there is none.
$ ~/go/src/gui$ GOOS=windows CGO_ENABLED=1 GOARCH= CC=x86_64-w64-mingw32-gcc go build
# github.com/mattn/go-gtk/glib
In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
from /usr/include/glib-2.0/glib/gtypes.h:32,
from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from ./glib.go.h:4,
from ../github.com/mattn/go-gtk/glib/glib.go:5:
/usr/include/glib-2.0/glib/gtypes.h: In function '_GLIB_CHECKED_ADD_U64':
/usr/include/glib-2.0/glib/gmacros.h:241:53: error: size of array '_GStaticAssertCompileTimeAssertion_0' is negative
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
^
/usr/include/glib-2.0/glib/gmacros.h:238:47: note: in definition of macro 'G_PASTE_ARGS'
#define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
^~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:241:44: note: in expansion of macro 'G_PASTE'
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
^~~~~~~
/usr/include/glib-2.0/glib/gtypes.h:423:3: note: in expansion of macro 'G_STATIC_ASSERT'
G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
^~~~~~~~~~~~~~~
# github.com/mattn/go-gtk/pango
In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
from /usr/include/glib-2.0/glib/gtypes.h:32,
from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from /usr/include/pango-1.0/pango/pango-coverage.h:25,
from /usr/include/pango-1.0/pango/pango-font.h:25,
from /usr/include/pango-1.0/pango/pango-attributes.h:25,
from /usr/include/pango-1.0/pango/pango.h:25,
from ./pango.go.h:7,
from ../github.com/mattn/go-gtk/pango/pango.go:5:
/usr/include/glib-2.0/glib/gtypes.h: In function '_GLIB_CHECKED_ADD_U64':
/usr/include/glib-2.0/glib/gmacros.h:241:53: error: size of array '_GStaticAssertCompileTimeAssertion_0' is negative
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
^
/usr/include/glib-2.0/glib/gmacros.h:238:47: note: in definition of macro 'G_PASTE_ARGS'
#define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
^~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:241:44: note: in expansion of macro 'G_PASTE'
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
^~~~~~~
/usr/include/glib-2.0/glib/gtypes.h:423:3: note: in expansion of macro 'G_STATIC_ASSERT'
G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));```
I need to build OpenBLAS static library which contains assembly functions - https://github.com/xianyi/OpenBLAS/releases . Personally, I'm trying to build 0.3.6 version.
Although, compilation process is successful, .o files are missing actual implementations when it comes to assembly functions.
I have problems with all my assembly functiosn, but I will give as an example one of them - _sdot_k.
How can I define that implementation is missing? I can define it by that fact that when I do nm [library_name].a, output for this function is following:
libopenblas_armv8p-r0.3.6.a(sdot_k.o):
0000000000000050 t .Ldot_kernel_F1
0000000000000058 t .Ldot_kernel_F10
0000000000000028 t .Ldot_kernel_F4
000000000000001c t .Ldot_kernel_F_BEGIN
00000000000000d8 t .Ldot_kernel_L999
00000000000000bc t .Ldot_kernel_S1
00000000000000c4 t .Ldot_kernel_S10
0000000000000084 t .Ldot_kernel_S4
0000000000000070 t .Ldot_kernel_S_BEGIN
0000000000000000 t ltmp0
There's no T identifier which tells that function implementation is here, in .o file. And of course, if I put this library into my iOS project I have such error:
Undefined symbols for architecture arm64:
"_sdot_k", referenced from:
_strmv_TLN in libopenblas.a(strmv_TLN.o)
_strmv_TLU in libopenblas.a(strmv_TLU.o)
_strmv_TUN in libopenblas.a(strmv_TUN.o)
_strmv_TUU in libopenblas.a(strmv_TUU.o)
_trmv_kernel in libopenblas.a(strmv_thread_TLN.o)
_trmv_kernel in libopenblas.a(strmv_thread_TLU.o)
_trmv_kernel in libopenblas.a(strmv_thread_TUN.o)
...
Here's the actual dot.S file:
#define ASSEMBLER
#include "common.h"
#define N x0 /* vector length */
#define X x1 /* X vector address */
#define INC_X x2 /* X stride */
#define Y x3 /* Y vector address */
#define INC_Y x4 /* Y stride */
#define I x5 /* loop variable */
/*******************************************************************************
* Macro definitions
*******************************************************************************/
#if !defined(DOUBLE)
#if !defined(DSDOT)
#define REG0 wzr
#define DOTF s0
#else // DSDOT
#define REG0 xzr
#define DOTF d0
#endif
#define DOTI s1
#define TMPX s2
#define LD1VX {v2.s}[0]
#define TMPY s3
#define LD1VY {v3.s}[0]
#define TMPVY v3.s[0]
#define SZ 4
#else
#define REG0 xzr
#define DOTF d0
#define DOTI d1
#define TMPX d2
#define LD1VX {v2.d}[0]
#define TMPY d3
#define LD1VY {v3.d}[0]
#define TMPVY v3.d[0]
#define SZ 8
#endif
/******************************************************************************/
.macro KERNEL_F1
ldr TMPX, [X], #SZ
ldr TMPY, [Y], #SZ
#if !defined(DSDOT)
fmadd DOTF, TMPX, TMPY, DOTF
#else // DSDOT
fcvt d3, TMPY
fcvt d2, TMPX
fmul d2, d2, d3
fadd DOTF, DOTF, d2
#endif
.endm
.macro KERNEL_F4
#if !defined(DOUBLE)
ld1 {v2.4s}, [X], #16
ld1 {v3.4s}, [Y], #16
#if !defined(DSDOT)
fmla v0.4s, v2.4s, v3.4s
#else
fcvtl2 v5.2d, v3.4s
fcvtl2 v4.2d, v2.4s
fcvtl v3.2d, v3.2s
fcvtl v2.2d, v2.2s
fmul v4.2d, v4.2d, v5.2d
fmul v2.2d, v2.2d, v3.2d
fadd v2.2d, v2.2d, v4.2d
fadd v0.2d, v0.2d, v2.2d
#endif
#else //DOUBLE
ld1 {v2.2d, v3.2d}, [X], #32
ld1 {v4.2d, v5.2d}, [Y], #32
fmul v2.2d, v2.2d, v4.2d
fmul v3.2d, v3.2d, v5.2d
fadd v0.2d, v0.2d, v2.2d
fadd v0.2d, v0.2d, v3.2d
#endif
PRFM PLDL1KEEP, [X, #1024]
PRFM PLDL1KEEP, [Y, #1024]
.endm
.macro KERNEL_F4_FINALIZE
#if !defined(DOUBLE)
#if !defined(DSDOT)
ext v1.16b, v0.16b, v0.16b, #8
fadd v0.2s, v0.2s, v1.2s
faddp DOTF, v0.2s
#else
faddp DOTF, v0.2d
#endif
#else //DOUBLE
faddp DOTF, v0.2d
#endif
.endm
.macro INIT_S
#if !defined(DOUBLE)
lsl INC_X, INC_X, #2
lsl INC_Y, INC_Y, #2
#else
lsl INC_X, INC_X, #3
lsl INC_Y, INC_Y, #3
#endif
.endm
.macro KERNEL_S1
ld1 LD1VX, [X], INC_X
ld1 LD1VY, [Y], INC_Y
#if !defined(DSDOT)
fmadd DOTF, TMPX, TMPY, DOTF
#else // DSDOT
fcvt d3, TMPY
fcvt d2, TMPX
fmul d2, d2, d3
fadd DOTF, DOTF, d2
#endif
.endm
/*******************************************************************************
* End of macro definitions
*******************************************************************************/
PROLOGUE
fmov DOTF, REG0
#if defined(DOUBLE)
fmov d6, DOTF
#endif
cmp N, xzr
ble .Ldot_kernel_L999
cmp INC_X, #1
bne .Ldot_kernel_S_BEGIN
cmp INC_Y, #1
bne .Ldot_kernel_S_BEGIN
.Ldot_kernel_F_BEGIN:
asr I, N, #2
cmp I, xzr
beq .Ldot_kernel_F1
.Ldot_kernel_F4:
KERNEL_F4
subs I, I, #1
bne .Ldot_kernel_F4
KERNEL_F4_FINALIZE
.Ldot_kernel_F1:
ands I, N, #3
ble .Ldot_kernel_L999
.Ldot_kernel_F10:
KERNEL_F1
subs I, I, #1
bne .Ldot_kernel_F10
ret
.Ldot_kernel_S_BEGIN:
INIT_S
asr I, N, #2
cmp I, xzr
ble .Ldot_kernel_S1
.Ldot_kernel_S4:
KERNEL_S1
KERNEL_S1
KERNEL_S1
KERNEL_S1
subs I, I, #1
bne .Ldot_kernel_S4
.Ldot_kernel_S1:
ands I, N, #3
ble .Ldot_kernel_L999
.Ldot_kernel_S10:
KERNEL_S1
subs I, I, #1
bne .Ldot_kernel_S10
.Ldot_kernel_L999:
ret
EPILOGUE
As you can see, there's PROLOGUE and EPILOGUE which are macroses, defined in C header:
#ifndef F_INTERFACE
#define REALNAME ASMNAME
#else
#define REALNAME ASMFNAME
#endif
#if defined(ASSEMBLER) && !defined(NEEDPARAM)
#define PROLOGUE \
.text ;\
.align 2 ;\
.globl REALNAME ;\
REALNAME:
#define EPILOGUE
#define PROFCODE
#endif
My guts are telling me that the problem lies somewhere in EPILOGUE and PROLOGUE, but I don't have decent Assembler knowledge to figure out a problem on my own.
Also I found this article - https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/Assembler/040-Assembler_Directives/asm_directives.html, but it didn't help me much. Maybe because of my lack of Assembly skill.
NOTE: If anyone is struggling with the same library trying to make it work on iOS, here's my thread on it's Github - https://github.com/xianyi/OpenBLAS/issues/2275#issuecomment-536982253is. It contains descriptions of all problems I overcomed.
NOTE 2: I really need OpenBLAS library and using Accelerate.framework is not an option in my case, unfortunately.
I'm happy to say that I overcome that issue. The problem was indeed in my PROLOGUE macros.
PROLOGUE macros I was using was converting to the assembly code in this manner:
.text; .align 2; .globl REALNAME; REALNAME:
And that was an issue. In order to make Assembly label work it should look like this:
.text;
.align 2;
.globl REALNAME;
REALNAME:
//assembly code
So in order to achieve that result I changed C macro to GAS macro as such:
.macro PROLOGUE
.text
.align 2
.globl REALNAME
REALNAME:
.endm
After that issue was gone!
NOTE: In order to remove any confusions, ; doesn't really play a role here. It's new line after each comma what matters.
very new to the site
i have delphi pos
and want to add bar code to the tillslip template the bar code need to be at the bottom of the page and it will be the document ID
the barcode need to be EAN 128
HEADER]
SELECT * FROM SALES_TRANSACTION_HEADER
JOIN STORES ON (ST_ID=TH_STORE_ID)
LEFT OUTER JOIN USERS ON (US_STORE_ID=TH_STORE_ID AND US_ID=TH_USER_ID)
WHERE TH_ID=?DOCUMENT_ID AND TH_STORE_ID=?STORE_ID AND TH_TYPE=?DOCUMENT_TYPE
DETAIL]
SELECT * FROM SALES_TRANSACTION_DETAIL
JOIN PRINTER_CATEGORY ON (PRC_STORE_ID=?THIS_STORE_ID AND PRC_WORKSTATION_ID=?THIS_WORKSTATION_ID AND PRC_PRINTER_ID=?THIS_PRINTER_ID AND PRC_CATEGORY_ID=TD_CATEGORY_ID1)
JOIN STORES ON (ST_ID=TD_STORE_ID)
LEFT OUTER JOIN SALES_REPS ON (SR_ID=TD_SALESREP_ID AND ((ST_GLOBAL_REPS = 0 AND SR_STORE_ID=TD_STORE_ID) OR (ST_GLOBAL_REPS 0 AND SR_STORE_ID=(SELECT ST_ID FROM STORES WHERE ST_TYPE = 2))))
WHERE TD_DOCUMENT_ID=?DOCUMENT_ID AND TD_STORE_ID=?STORE_ID AND TD_TYPE=?DOCUMENT_TYPE
[SQL_PAYMENT]
SELECT * FROM SALES_TRANSACTION_PAYMENT
LEFT OUTER JOIN TENDER_TYPES ON (TT_ID=TP_TENDER_ID)
WHERE TP_DOCUMENT_ID=?DOCUMENT_ID AND TP_STORE_ID=?STORE_ID AND TP_TYPE=?DOCUMENT_TYPE
[HEADER]
+
+[PRINTLOGO]
+
+ TAX INVOICE
+
+CASH SALE
+Document ID: ~0ddddddd;
!TH_ID
#IF !TH_PRINTED_COUNT THEN
+ COPY ~D
!TH_PRINTED_COUNT
#ELSE
+
#ENDIF
+~SSSSSSSSS ~SSSSSSS
!TH_TRANSACTION_DATE,!TH_TRANSACTION_TIME
+
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!ST_COMPANYNAME
#IF !ST_PHYSICALADDR1 THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!ST_PHYSICALADDR1
#ENDIF
#IF !ST_PHYSICALADDR2 THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!ST_PHYSICALADDR2
#ENDIF
#IF !ST_PHYSICALADDR3 THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!ST_PHYSICALADDR3
#ENDIF
#IF !ST_PHYSICALADDR4 THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!ST_PHYSICALADDR4
#ENDIF
#IF !ST_PHYSICALADDR5 THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!ST_PHYSICALADDR5
#ENDIF
#IF !ST_TELEPHONE1 THEN
+
+Telephone: ~SSSSSSSSSSSSSSSSSSS
!ST_TELEPHONE1
#ENDIF
#IF !ST_FAX THEN
+ Fax: ~SSSSSSSSSSSSSSSSSSS
!ST_FAX
#ENDIF
#IF !ST_TAX_NUMBER THEN
+VAT Reg #: ~SSSSSSSSSSSSSSSSSSSSSSS
!ST_TAX_NUMBER
#ENDIF
#IF !TH_CUSTOMER_NAME THEN
+
+To:~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!TH_CUSTOMER_NAME
#ENDIF
#IF !TH_ADDRESS_1 THEN
+ ~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!TH_ADDRESS_1
#ENDIF
#IF !TH_ADDRESS_2 THEN
+ ~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!TH_ADDRESS_2
#ENDIF
#IF !TH_ADDRESS_3 THEN
+ ~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!TH_ADDRESS_3
#ENDIF
#IF !TH_ADDRESS_4 THEN
+ ~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!TH_ADDRESS_4
#ENDIF
#IF !TH_ADDRESS_5 THEN
+ ~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!TH_ADDRESS_5
#ENDIF
#IF !TH_TELEPHONE THEN
+Telephone: ~SSSSSSSSSSSSSSSSSSS
!TH_TELEPHONE
#ENDIF
#IF !TH_ACCOUNTCODE THEN
+Account No: ~SSSSSSSSSSSSSSSSSSS
!TH_ACCOUNTCODE
#ENDIF
#IF !TH_EXEMPT_TAX_NUMBER THEN
+Tax Number:~SSSSSSSSSSSSSSSSSSSS
!TH_EXEMPT_TAX_NUMBER
#ENDIF
#IF !TH_ORDER_NUMBER THEN
+Order Number:~SSSSSSSSSSSSSSSSSSSS
!TH_ORDER_NUMBER
#ENDIF
+
+Description Unit
+Item Code Price Qty Nett
+---------------------------------------
[DETAIL]
#IF (!TD_ITEMTYPE 3) THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!TD_DESCRIPTION
#ELSE
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!TD_DESCRIPTION
#ENDIF
+~SSSSSSSSSSSSSSS ~fff.ff ~ff.q ~ffff.ff;
!TD_PRODUCTCODE,!TD_RETAIL_PRICE,!TD_QTY,!TD_LINE_VALUE
#IF !TD_LINE_TAX_ID = 0 THEN
+*;
#ELSEIF !TD_LINE_TAX_ID = 2 THEN
+#;
#ENDIF
+
#IF !TD_DISCOUNT_AMOUNT 0 THEN
+ Discount on above line ~ffff.ff
!TD_DISCOUNT_AMOUNT
#ENDIF
#IF (!TD_ITEMTYPE = 2) AND (!TD_COLOUR_PACK_SERIAL '') THEN
+Colour/Size:~SSSSSSSSSSSSSSSSSSSSSSSSS
!TD_COLOUR_PACK_SERIAL
#ENDIF
#IF (!TD_ITEMTYPE = 3) AND (!TD_COLOUR_PACK_SERIAL '') THEN
+Serial #:~SSSSSSSSSSSSSSSSSSSSSSSSSSSS
!TD_COLOUR_PACK_SERIAL
#ENDIF
$COUNT=0
#WHILE $COUNT
[SUMMARY]
+---------------------------------------
#IF !TH_TRANSACTION_TAX_TYPE THEN
+ SUB-TOTAL: ~ffffffff.ff
!TH_TRANSACTION_TOTAL - !TH_TRANSACTION_TAX - !TH_ADMIN_FEE + !TH_OVERALL_DISCOUNT + !TH_ROUNDING_LOSS
#ELSEIF (!TH_ADMIN_FEE 0) OR (!TH_OVERALL_DISCOUNT 0) OR (!TH_ROUNDING_LOSS 0) THEN
+ SUB-TOTAL: ~ffffffff.ff
!TH_TRANSACTION_TOTAL - !TH_ADMIN_FEE + !TH_OVERALL_DISCOUNT + !TH_ROUNDING_LOSS
#ENDIF
#IF !TH_OVERALL_DISCOUNT THEN
+ ~sssssssssssssssssss: ~ffffffff.ff
'DISCOUNT (' + !TH_OVERALL_PERCENT + '%)', -!TH_OVERALL_DISCOUNT
#ENDIF
#IF !TH_ADMIN_FEE THEN
+ ADMIN CHARGE: ~ffffffff.ff
!TH_ADMIN_FEE
#ENDIF
#IF !TH_TRANSACTION_TAX_TYPE THEN
+ VAT: ~ffffffff.ff
!TH_TRANSACTION_TAX
#ELSE
+ VAT INCLUDED: ~ffffffff.ff
!TH_TRANSACTION_TAX
#ENDIF
#IF !TH_ROUNDING_LOSS 0 THEN
+ ROUNDING LOSS: ~ffffffff.ff
-!TH_ROUNDING_LOSS
#ENDIF
#IF (!TH_TRANSACTION_TAX_TYPE > 0) OR (!TH_ADMIN_FEE 0) OR (!TH_OVERALL_DISCOUNT 0) OR (!TH_ROUNDING_LOSS 0) THEN
+ ------------
#ENDIF
+ TOTAL: ~ffffffff.ff
!TH_TRANSACTION_TOTAL
#IF !TH_DEPOSIT_AMOUNT THEN
+ LESS DEPOSIT: ~ffffffff.ff
-!TH_DEPOSIT_AMOUNT
+ TOTAL AFTER DEPOSIT: ~ffffffff.ff
!TH_TRANSACTION_TOTAL - !TH_DEPOSIT_AMOUNT
#ENDIF
+ ------------
#IF $PAYMENTCOUNT > 0 THEN
$CHANGE = 0
$COUNTER = 0
&FIRSTPAYMENT
#WHILE $COUNTER 0 THEN
+~ssssssssssssssssssssssss: ~ffffffff.ff
!TT_NAME + ' CHANGE', -!TP_AMOUNT
#IF !TP_NUMBER THEN
+~ssssssssssssssssssssssssssssssssssssss
!TT_NAME + ' #: ' + !TP_NUMBER
#ENDIF
#ENDIF
$COUNTER = $COUNTER + 1
&NEXTPAYMENT
#ENDWHILE
#ENDIF
[FOOTER]
+---------------------------------------
+User: ~SSSSSSSSSSSSSSSSSSSSSSS Wks: ~DD
!US_NAME, !TH_WORKSTATION_ID
+ Rep: ~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
!DETAIL.SR_NAME
#IF !TH_OUR_REFERENCE '' THEN
+ Our Reference: ~SSSSSSSSSSSSSSSSSSSSSS
!TH_OUR_REFERENCE
#ENDIF
#IF !TH_YOUR_REFERENCE '' THEN
+Your Reference: ~SSSSSSSSSSSSSSSSSSSSSS
!TH_YOUR_REFERENCE
#ENDIF
#IF $MESSAGE1 THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
$MESSAGE1
#ENDIF
#IF $MESSAGE2 THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
$MESSAGE2
#ENDIF
#IF $MESSAGE3 THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
$MESSAGE3
#ENDIF
#IF $MESSAGE4 THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
$MESSAGE4
#ENDIF
#IF $MESSAGE5 THEN
+~SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
$MESSAGE5
#ENDIF
I just upgraded to cocos 2.1, and am seeing a ridiculous amount of logging to the console, such as:
2013-09-18 23:15:38.120 Notes and Clefs[842:907] cocos2d: deallocing <CCSprite = 0x1182aa0 | Rect = (816.00,640.00,32.00,64.00) | tag = -1 | atlasIndex = -1>
2013-09-18 23:15:38.121 Notes and Clefs[842:907] cocos2d: deallocing <CCSprite = 0x1182600 | Rect = (816.00,128.00,32.00,64.00) | tag = -1 | atlasIndex = -1>
2013-09-18 23:15:38.122 Notes and Clefs[842:907] cocos2d: deallocing <CCArray = 0x1161e00> = ( <CCSprite = 0x1182790 | Rect = (816.00,640.00,32.00,64.00) | tag = -1 | atlasIndex = -1>, )
etc..
From looking at the code, I see:
#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0
#define CCLOG(...) do {} while (0)
#define CCLOGWARN(...) do {} while (0)
#define CCLOGINFO(...) do {} while (0)
#elif COCOS2D_DEBUG == 1
#define CCLOG(...) __CCLOG(__VA_ARGS__)
#define CCLOGWARN(...) __CCLOGWITHFUNCTION(__VA_ARGS__)
#define CCLOGINFO(...) do {} while (0)
#elif COCOS2D_DEBUG > 1
#define CCLOG(...) __CCLOG(__VA_ARGS__)
#define CCLOGWARN(...) __CCLOGWITHFUNCTION(__VA_ARGS__)
#define CCLOGINFO(...) __CCLOG(__VA_ARGS__)
#endif // COCOS2D_DEBUG
And I set COCOS2D_DEBUG = 0, but I still get the same verbose logging...
I have Cocos2D in my project as a static library .a file.. Is it possible that this .a already has a macro/constant defined at level 2 or something, and that's why I'm seeing it not make any difference?
Can anyone recommend a way to turn this off?
Yes, when the static library is compiled using the Debug scheme, it'll print all these debug messages out. Try recompiling the static library with the COCOS2D_DEBUG preprocessor macro set to 1.
Why are you adding it as a static .a library though? I just add the cocos2d-ios.xcodeproj to my own project and add libcocos2d.a to Build Phases under Link Binary with Libraries. That way it'll automatically recompile cocos2d whenever a change occurs.