You are not logged in.

Read the FAQ and Knowledge Base before posting.
We won't make a 3DS/2DS emulator.



#1 2013-02-08 19:33:49

zwastik
Member
Registered: 2013-02-08
Posts: 2

DeSmuME SVN r4523 Linux compile time error

I get a compile error, archlinux 64 bits:

1 -I. -I../src -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -pthread -I/usr/inc
lude/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/agg2 -I/usr/include/fre
etype2 -march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_
FORTIFY_SOURCE=2 -MT OGLRender.o -MD -MP -MF .deps/OGLRender.Tpo -c -o OGLRender.o
OGLRender.cpp
In file included from NDSSystem.h:26:0,
from OGLRender.cpp:27:
GPU.h:123:2: error: expected identifier before numeric constant
GPU.h:123:2: error: expected ‘}’ before numeric constant
GPU.h:123:2: error: expected unqualified-id before numeric constant
GPU.h:124:1: error: expected declaration before ‘}’ token
make[2]: *** [OGLRender.o] Error 1
make[2]: se sale del directorio `/tmp/yaourt-tmp-idr/aur-desmume-svn/src/desmume-bu
ild/src'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/tmp/yaourt-tmp-idr/aur-desmume-svn/src/desmume-bu
ild/src'
make: *** [all-recursive] Error 1

Offline

#2 2013-02-08 19:49:38

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

Re: DeSmuME SVN r4523 Linux compile time error

try dumping the preprocessed output for OGLRender.o and seeing whats #defining None

Offline

#3 2013-02-08 23:12:20

zwastik
Member
Registered: 2013-02-08
Posts: 2

Re: DeSmuME SVN r4523 Linux compile time error

I am not sure how to do what you said, but here is some info I found:

#[/path/aur-desmume-svn/src/desmume/src]% grep -R None *.h
GPU.h:  None, Blend, Increase, Decrease
GPU.h:/*12*/ u8 AckColorBufferUnderflow:1; // Color Buffer RDLINES Underflow (0=None, 1=Underflow/Acknowledge)
GPU.h:/*13*/ u8 AckVertexRAMOverflow:1;    // Polygon/Vertex RAM Overflow    (0=None, 1=Overflow/Acknowledge)                                                         
SPU.h:  SPUInterpolation_None = 0,
texcache.h:     TexFormat_None, //used when nothing yet is cached
texcache.h:             , cacheFormat(TexFormat_None)


#[/path/aur-desmume-svn/src/desmume/src]% grep -R None *.cpp
addons.cpp:extern ADDONINTERFACE addonNone;
addons.cpp:             addonNone,
arm_jit.cpp:            c.test(byte_ptr_abs((void*)(arm_cond_table + cond), x, kScaleNone), 1);
arm_jit.cpp:                            c.lea(total_cycles, ptr(total_cycles.r64(), bb_cycles.r64(), kScaleNone, -1));
GPU.cpp:                                case None:
GPU.cpp:        if(FUNC==None && BACKDROP) return true;
GPU.cpp:                case None: break;
GPU.cpp:                case None: break;
GPU.cpp:                case 0: draw = _master_setFinalBGColor<BACKDROP,None,false>(color,x); break;
GPU.cpp:                case 4: draw = _master_setFinalBGColor<BACKDROP,None,true>(color,x); break;
GPU.cpp:        case 0x0: _master_setFinal3dColor<None,false>(dstX,srcX); break;
GPU.cpp:        case 0x4: _master_setFinal3dColor<None,true>(dstX,srcX); break;
GPU.cpp:        case 0x0: _master_setFinalOBJColor<None,false>(gpu, dst, color, alpha, type, x); break;
GPU.cpp:        case 0x4: _master_setFinalOBJColor<None,true>(gpu, dst, color, alpha, type, x); break;
mc.cpp:                         if (strcmp(tmp, "None")  == 0)
NDSSystem.cpp:                          printf("None");
NDSSystem.cpp:  imageheader.cmptype = 0; // None
NDSSystem.cpp:  imageheader.cmptype = 0; // None
render3D.cpp:   "None",
slot1.cpp:extern SLOT1INTERFACE slot1None;
slot1.cpp:              slot1None,
SPU.cpp:        if(INTERPOLATE_MODE != SPUInterpolation_None)
SPU.cpp:        if(INTERPOLATE_MODE != SPUInterpolation_None)
SPU.cpp:        if(INTERPOLATE_MODE != SPUInterpolation_None)
SPU.cpp:        case SPUInterpolation_None: __SPU_ChanUpdate<SPUInterpolation_None>(actuallyMix, SPU, chan); break;

Last edited by zwastik (2013-02-08 23:13:36)

Offline

#4 2013-02-08 23:55:23

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

Re: DeSmuME SVN r4523 Linux compile time error

cause -E to get issued to the gcc commandline. not sure the best way to do it, but there should be about 30 ways

Offline

#5 2013-02-14 20:38:42

kbios
Member
Registered: 2012-12-21
Posts: 10

Re: DeSmuME SVN r4523 Linux compile time error

Same error here, the preprocessed output shows that the enum is getting transformed into

enum BlendFunc
{
 0L, Blend, Increase, Decrease
};

However, searching for "#define None" in the whole source tree yielded no results, and '0L' results seemed uninteresting...

Offline

#6 2013-02-14 21:15:21

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

Re: DeSmuME SVN r4523 Linux compile time error

Offline

#7 2013-02-14 21:27:43

kbios
Member
Registered: 2012-12-21
Posts: 10

Re: DeSmuME SVN r4523 Linux compile time error

Indeed, adding #undef None to GPU.h solved the problem. Thanks!

Offline

#8 2013-02-15 00:57:40

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

Re: DeSmuME SVN r4523 Linux compile time error

in retrospect, that was a pretty obvious move. but it would be nice to confirm whether thats the header file that's doing it

http://wmpkamp.com/joi/SplicerDocs/loca … 1/X.h.html

see line 120 in that x11.h

can you find something similar in your x11.h?

Offline

#9 2013-02-18 19:09:27

kbios
Member
Registered: 2012-12-21
Posts: 10

Re: DeSmuME SVN r4523 Linux compile time error

zeromus wrote:

in retrospect, that was a pretty obvious move. but it would be nice to confirm whether thats the header file that's doing it

http://wmpkamp.com/joi/SplicerDocs/loca … 1/X.h.html

see line 120 in that x11.h

can you find something similar in your x11.h?

Yep:

 

/*****************************************************************
 * RESERVED RESOURCE AND CONSTANT DEFINITIONS
 *****************************************************************/

#ifndef None
#define None                 0L	/* universal null resource or null atom */
#endif

Offline

Board footer

Powered by FluxBB