Author Topic: snes-sdk problem (Help!)  (Read 3884 times)

0 Members and 1 Guest are viewing this topic.

Offline sizeak

  • Newbie
  • *
  • Posts: 4
  • NEO newbie
snes-sdk problem (Help!)
« on: August 18, 2011, 07:00:23 AM »
Hey,

I've built the snes-sdk on linux but when I try and build the snesc example I keep getting this error:

/usr/local/snes-sdk/bin/wla-65816 -io snesc.s snesc.obj
INCLUDE_DIRECTIVES: ROMBANKS/ROMBANKMAP wasn't defined.
make: *** [snesc.obj] Error 1

Could anyone help? I can't figure out what the problem is.
Thanks

Offline sizeak

  • Newbie
  • *
  • Posts: 4
  • NEO newbie
Re: snes-sdk problem (Help!)
« Reply #1 on: August 18, 2011, 07:45:44 AM »
It seems that the optimisation was stripping everything resulting in 0 byte output. WTF. anyway removing -O from the provided make file works.

Now I'm having issues with:

/usr/local/snes-sdk/bin/wlalink -dvSo data.obj snesc.obj input.obj init.obj graph.obj str.obj snesc.smc
DISCARD: /usr/local/snes-sdk/lib/libm.obj:libm.asm: Section ".libm" was discarded.
DISCARD: /usr/local/snes-sdk/lib/libc.obj:libc.asm: Section ".libc_misc" was discarded.
DISCARD: /usr/local/snes-sdk/lib/libc.obj:libc.asm: Section ".libc_cstd" was discarded.
DISCARD: snesc.obj:snesc.s: Section ".text_0x0" was discarded.
DISCARD: graph.obj:graph.s: Section ".text_0x1" was discarded.
DISCARD: graph.obj:graph.s: Section ".text_0x2" was discarded.
/usr/local/snes-sdk/lib/crt0_snes.obj:crt0_snes.asm:284: FIX_REFERENCES: Reference to an unknown label "__malloc_init".
make: *** [snesc.smc] Error 1

Help appreciated, thanks
« Last Edit: August 18, 2011, 09:18:08 AM by sizeak »

Offline mic_

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 632
Re: snes-sdk problem (Help!)
« Reply #2 on: August 18, 2011, 01:23:44 PM »
__malloc_init should be in  /usr/local/snes-sdk/lib/libc.obj  unless something went wrong when you built the libs.

Offline sizeak

  • Newbie
  • *
  • Posts: 4
  • NEO newbie
Re: snes-sdk problem (Help!)
« Reply #3 on: August 18, 2011, 07:43:05 PM »
__malloc_init should be in  /usr/local/snes-sdk/lib/libc.obj  unless something went wrong when you built the libs.

They seem to build fine and it definitely exists in the source file. I guess I could try dumping the obj to see

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1751
  • Just a coding machine.
Re: snes-sdk problem (Help!)
« Reply #4 on: August 21, 2011, 02:44:34 PM »
Did you remember to build and install mic's lib from the svn repo, or are you trying to use the libs from the snes-sdk? Mic's libs are in the svn repo on the google code page at the same level as the menu.

Offline sizeak

  • Newbie
  • *
  • Posts: 4
  • NEO newbie
Re: snes-sdk problem (Help!)
« Reply #5 on: August 29, 2011, 09:54:29 PM »
No, I'm not building the menu. The problem was caused by the python optimisation script. It was stripping everything out leaving empty binaries