Re: Modifying LJ to add a few math functions

  • From: Mike Pall <mike-1308@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 16 Aug 2013 10:04:13 +0200

Emil Dotchevski wrote:
> Mike, I'm pretty sure that I've broken the X360 build with this
> change. Is adding the two LJLIB_CFs as you indicated above all I have
> to do to add math.nmod/ndiv?

Yes.

Try cleaning the directory before every rebuild:

  del *.obj *.lib *.exp *.dll *.exe *.manifest *.pdb *.ilk

Or maybe set up a clean build environment from scratch. Note: it's
probably not a good idea to mix a PC and a console build in the
same directory.

> When I build, in the generated files I get nmod and ndiv, and they
> appear just before math.deg and math.rad in lj_ffdef.h.

buildvm.exe and the *def.h files are re-generated every time you
recompile. The new library functions should appear exactly in the
order you placed them in lib_math.c.

> It seems like lj_ffrecord.c isn't generated and I haven't added
> anything to it for nmod/ndiv. Could that be my problem?

You mean lj_recdef.h? This file is only needed for JIT-enabled
builds. And it only has entries for library functions that are
compiled.

--Mike

Other related posts: