Homebrew Big Red Menu - Legal CIA installer/uninstaller

Status
Not open for further replies.

tvo770

Well-Known Member
Newcomer
Joined
Oct 25, 2008
Messages
90
Trophies
1
XP
406
Country
United States
I'm getting this error that I can't figure out when I compile can someone help?

Code:
C:\3ds>REM === Build ===
 
C:\3ds>make
index.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/index.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=sof
tfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/index.cpp -o index.o
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
c:/3ds/source/index.cpp:5:22: warning: 'index_lua' defined but not used [-Wunuse
d-variable]
static unsigned char index_lua[] __attribute__((aligned(16))) = {
                      ^
luaControls.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaControls.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11
-D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaControls.cpp
-o luaControls.o
luaGraphics.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaGraphics.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11
-D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaGraphics.cpp
-o luaGraphics.o
c:/3ds/source/luaGraphics.cpp: In function 'void DrawScreenText(int, int, char*,
u32, int, int)':
c:/3ds/source/luaGraphics.cpp:130:5: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
u8* buffer;
    ^
c:/3ds/source/luaGraphics.cpp: In function 'void FillScreenRect(int, int, int, i
nt, u32, int, int)':
c:/3ds/source/luaGraphics.cpp:218:6: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
  u8* buffer;
      ^
c:/3ds/source/luaGraphics.cpp: In function 'void FillScreenEmptyRect(int, int, i
nt, int, u32, int, int)':
c:/3ds/source/luaGraphics.cpp:245:6: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
  u8* buffer;
      ^
luaPlayer.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaPlayer.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaPlayer.cpp -o l
uaPlayer.o
c:/3ds/source/luaPlayer.cpp: In function 'const char* runScript(const char*, boo
l)':
c:/3ds/source/luaPlayer.cpp:55:26: error: 'CSND_initialize' was not declared in
this scope
  if (CSND_initialize(NULL)==0){
                          ^
c:/3ds/source/luaPlayer.cpp:56:16: error: 'CSND_shutdown' was not declared in th
is scope
  CSND_shutdown();
                ^
c:/3ds/source/luaPlayer.cpp:71:16: warning: deprecated conversion from string co
nstant to 'char*' [-Wwrite-strings]
  char* patch = "dofile = System.dofile\n\
                ^
make[1]: *** [luaPlayer.o] Error 1
make: *** [build] Error 2
 
C:\3ds>REM === pause if there were errors ===
 
C:\3ds>if 2 NEQ 0 pause
Press any key to continue . . .
 

Lenan

Well-Known Member
Member
Joined
Feb 1, 2015
Messages
172
Trophies
0
Age
32
XP
142
Country
Swaziland
I'm getting this error that I can't figure out when I compile can someone help?
-snip-


You have to add these lines to csnd.h
Code:
// At the top
#define CSND_ENCODING_IMA_ADPCM 0
#define CSND_LOOP_ENABLE 0
 
// At the bottom
Result CSND_initialize(int* x);
void CSND_shutdown();
void CSND_writesharedmem_cmdtype0(u32 hex, u8* cmdparams);
void CSND_sharedmemtype0_cmde(u32 channel, bool loop, u32 encoding, u32 samplerate, u8 x, u8 y, u32 physaddr0, u32 physaddr1, u32 size);
void CSND_sharedmemtype0_cmd8(u32 channel, u32 samplerate);
void CSND_sharedmemtype0_cmd3(u32 channel, u32 physaddr1, u32 size);
void CSND_sharedmemtype0_cmdupdatestate(int x);
void My_CSND_playsound(u32 x, u32 y, u32 z, u32 a, u32* b, u32* c, u32 d, u32 e, u32 f);
void CSND_playbackstate(int channel, int x);
void CSND_setchannel_playbackstate(int channel, int x);
 
  • Like
Reactions: tvo770

tvo770

Well-Known Member
Newcomer
Joined
Oct 25, 2008
Messages
90
Trophies
1
XP
406
Country
United States
You have to add these lines to csnd.h
Code:
// At the top
#define CSND_ENCODING_IMA_ADPCM 0
#define CSND_LOOP_ENABLE 0
 
// At the bottom
Result CSND_initialize(int* x);
void CSND_shutdown();
void CSND_writesharedmem_cmdtype0(u32 hex, u8* cmdparams);
void CSND_sharedmemtype0_cmde(u32 channel, bool loop, u32 encoding, u32 samplerate, u8 x, u8 y, u32 physaddr0, u32 physaddr1, u32 size);
void CSND_sharedmemtype0_cmd8(u32 channel, u32 samplerate);
void CSND_sharedmemtype0_cmd3(u32 channel, u32 physaddr1, u32 size);
void CSND_sharedmemtype0_cmdupdatestate(int x);
void My_CSND_playsound(u32 x, u32 y, u32 z, u32 a, u32* b, u32* c, u32 d, u32 e, u32 f);
void CSND_playbackstate(int channel, int x);
void CSND_setchannel_playbackstate(int channel, int x);

Thanks for the help but I run into another issue looking at what you did to fix the other one I'm pretty sure that the problem lies in fs.h but I'm not really sure how you figured out to get the code to fix the other one if you can help me with this one too it would also be appreciated if you can tell me how you did it slash send me a pm to something that would help me.

Code:
C:\3ds>REM === Build ===
 
C:\3ds>make
index.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/index.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=sof
tfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/index.cpp -o index.o
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
c:/3ds/source/index.cpp:5:22: warning: 'index_lua' defined but not used [-Wunuse
d-variable]
static unsigned char index_lua[] __attribute__((aligned(16))) = {
                      ^
luaControls.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaControls.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11
-D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaControls.cpp
-o luaControls.o
In file included from c:/devkitPro/libctru/include/3ds.h:24:0,
                from c:/3ds/source/luaControls.cpp:37:
c:/devkitPro/libctru/include/3ds/services/fs.h:60:1: error: expected initializer
before 'typedef'
typedef enum
^
c:/devkitPro/libctru/include/3ds/services/fs.h:67:3: error: 'FS_pathType' does n
ot name a type
} FS_pathType;
  ^
c:/devkitPro/libctru/include/3ds/services/fs.h:89:2: error: 'FS_pathType' does n
ot name a type
  FS_pathType type;  //!< FS path type.
  ^
c:/devkitPro/libctru/include/3ds/services/fs.h:133:21: error: 'FS_pathType' was
not declared in this scope
FS_path FS_makePath(FS_pathType type, const char  *path);
                    ^
c:/devkitPro/libctru/include/3ds/services/fs.h:133:39: error: expected primary-e
xpression before 'const'
FS_path FS_makePath(FS_pathType type, const char  *path);
                                      ^
make[1]: *** [luaControls.o] Error 1
make: *** [build] Error 2
 
C:\3ds>REM === pause if there were errors ===
 
C:\3ds>if 2 NEQ 0 pause
Press any key to continue . . .
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
Thanks for the help but I run into another issue looking at what you did to fix the other one I'm pretty sure that the problem lies in fs.h but I'm not really sure how you figured out to get the code to fix the other one if you can help me with this one too it would also be appreciated if you can tell me how you did it slash send me a pm to something that would help me.

Code:
C:\3ds>REM === Build ===
 
C:\3ds>make
index.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/index.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=sof
tfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/index.cpp -o index.o
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
c:/3ds/source/index.cpp:5:22: warning: 'index_lua' defined but not used [-Wunuse
d-variable]
static unsigned char index_lua[] __attribute__((aligned(16))) = {
                      ^
luaControls.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaControls.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11
-D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaControls.cpp
-o luaControls.o
In file included from c:/devkitPro/libctru/include/3ds.h:24:0,
                from c:/3ds/source/luaControls.cpp:37:
c:/devkitPro/libctru/include/3ds/services/fs.h:60:1: error: expected initializer
before 'typedef'
typedef enum
^
c:/devkitPro/libctru/include/3ds/services/fs.h:67:3: error: 'FS_pathType' does n
ot name a type
} FS_pathType;
  ^
c:/devkitPro/libctru/include/3ds/services/fs.h:89:2: error: 'FS_pathType' does n
ot name a type
  FS_pathType type;  //!< FS path type.
  ^
c:/devkitPro/libctru/include/3ds/services/fs.h:133:21: error: 'FS_pathType' was
not declared in this scope
FS_path FS_makePath(FS_pathType type, const char  *path);
                    ^
c:/devkitPro/libctru/include/3ds/services/fs.h:133:39: error: expected primary-e
xpression before 'const'
FS_path FS_makePath(FS_pathType type, const char  *path);
                                      ^
make[1]: *** [luaControls.o] Error 1
make: *** [build] Error 2
 
C:\3ds>REM === pause if there were errors ===
 
C:\3ds>if 2 NEQ 0 pause
Press any key to continue . . .

This is my fs.h:
Code:
#pragma once
#include <3ds/types.h>
 
/*! @file FS.h
*
*  Filesystem Services
*/
 
/*! @defgroup fs_open_flags FS Open Flags
*
*  @sa FSUSER_OpenFile
*  @sa FSUSER_OpenFileDirectly
*
*  @{
*/
 
/*! Open file for read. */
#define FS_OPEN_READ  (1<<0)
/*! Open file for write. */
#define FS_OPEN_WRITE  (1<<1)
/*! Create file if it doesn't exist. */
#define FS_OPEN_CREATE (1<<2)
/* @} */
 
/*! @defgroup fs_create_attributes FS Create Attributes
*
*  @sa FSUSER_OpenFile
*  @sa FSUSER_OpenFileDirectly
*
*  @{
*/
 
/*! No attributes. */
#define FS_ATTRIBUTE_NONE      (0x00000000)
/*! Create with read-only attribute. */
#define FS_ATTRIBUTE_READONLY  (0x00000001)
/*! Create with archive attribute. */
#define FS_ATTRIBUTE_ARCHIVE  (0x00000100)
/*! Create with hidden attribute. */
#define FS_ATTRIBUTE_HIDDEN    (0x00010000)
/*! Create with directory attribute. */
#define FS_ATTRIBUTE_DIRECTORY (0x01000000)
/*! @} */
 
/*! @defgroup fs_write_flush_flags FS Flush Flags
*
*  @sa FSFILE_Write
*
*  @{
*/
 
/*! Don't flush */
#define FS_WRITE_NOFLUSH (0x00000000)
/*! Flush */
#define FS_WRITE_FLUSH  (0x00010001)
 
/* @} */
 
/*! FS path type */
typedef enum
{
    PATH_INVALID = 0, //!< Specifies an invalid path.
    PATH_EMPTY  = 1, //!< Specifies an empty path.
    PATH_BINARY  = 2, //!< Specifies a binary path, which is non-text based.
    PATH_CHAR    = 3, //!< Specifies a text based path with a 8-bit byte per character.
    PATH_WCHAR  = 4, //!< Specifies a text based path with a 16-bit short per character.
} FS_pathType;
 
/*! FS archive ids */
typedef enum
{
    ARCH_ROMFS = 0x3,
    ARCH_SAVEDATA = 0x4,
    ARCH_EXTDATA = 0x6,
    ARCH_SHARED_EXTDATA = 0x7,
    ARCH_SYSTEM_SAVEDATA = 0x8,
    ARCH_SDMC = 0x9,
    ARCH_SDMC_WRITE_ONLY = 0xA,
    ARCH_BOSS_EXTDATA = 0x12345678,
    ARCH_CARD_SPIFS = 0x12345679,
    ARCH_NAND_RW = 0x1234567D,
    ARCH_NAND_RO = 0x1234567E,
    ARCH_NAND_RO_WRITE_ACCESS = 0x1234567F,
} FS_archiveIds;
 
/*! FS path */
typedef struct
{
    FS_pathType type;  //!< FS path type.
    u32        size;  //!< FS path size.
    const u8    *data; //!< Pointer to FS path data.
} FS_path;
 
/*! FS archive */
typedef struct
{
    u32    id;        //!< Archive ID.
    FS_path lowPath;    //!< FS path.
    Handle  handleLow;  //!< High word of handle.
    Handle  handleHigh; //!< Low word of handle.
} FS_archive;
 
/*! Directory entry */
typedef struct
{
  // 0x00
  u16 name[0x106];    //!< UTF-16 encoded name
  // 0x20C
  u8  shortName[0x09]; //!< 8.3 file name
  // 0x215
  u8  unknown1;        //!< ???
  // 0x216
  u8  shortExt[0x04];  //!< 8.3 file extension (set to spaces for directories)
  // 0x21A
  u8  unknown2;        //!< ???
  // 0x21B
  u8  unknown3;        //!< ???
  // 0x21C
  u8  isDirectory;    //!< directory bit
  // 0x21D
  u8  isHidden;        //!< hidden bit
  // 0x21E
  u8  isArchive;      //!< archive bit
  // 0x21F
  u8  isReadOnly;      //!< read-only bit
  // 0x220
  u64 fileSize;        //!< file size
} FS_dirent;
 
Result fsInit(void);
Result fsExit(void);
 
FS_path FS_makePath(FS_pathType type, const char  *path);
 
Result FSUSER_Initialize(Handle* handle);
Result FSUSER_OpenArchive(Handle* handle, FS_archive* archive);
Result FSUSER_OpenDirectory(Handle* handle, Handle* out, FS_archive archive, FS_path dirLowPath);
Result FSUSER_OpenFile(Handle* handle, Handle* out, FS_archive archive, FS_path fileLowPath, u32 openflags, u32 attributes);
Result FSUSER_OpenFileDirectly(Handle* handle, Handle* out, FS_archive archive, FS_path fileLowPath, u32 openflags, u32 attributes);
Result FSUSER_CloseArchive(Handle* handle, FS_archive* archive);
Result FSUSER_CreateFile(Handle* handle, FS_archive archive, FS_path fileLowPath, u32 fileSize);
Result FSUSER_CreateDirectory(Handle* handle, FS_archive archive, FS_path dirLowPath);
Result FSUSER_DeleteFile(Handle *handle, FS_archive archive, FS_path fileLowPath);
Result FSUSER_DeleteDirectory(Handle *handle, FS_archive archive, FS_path dirLowPath);
Result FSUSER_RenameFile(Handle *handle, FS_archive srcArchive, FS_path srcFileLowPath, FS_archive destArchive, FS_path destFileLowPath);
Result FSUSER_RenameDirectory(Handle *handle, FS_archive srcArchive, FS_path srcDirLowPath, FS_archive destArchive, FS_path destDirLowPath);
Result FSUSER_GetSdmcArchiveResource(Handle *handle, u32 *sectorSize, u32 *clusterSize, u32 *numClusters, u32 *freeClusters);
Result FSUSER_IsSdmcDetected(Handle *handle, u8 *detected);
Result FSUSER_IsSdmcWritable(Handle *handle, u8 *writable);
 
Result FSFILE_Close(Handle handle);
Result FSFILE_Read(Handle handle, u32 *bytesRead, u64 offset, void *buffer, u32 size);
Result FSFILE_Write(Handle handle, u32 *bytesWritten, u64 offset, const void *buffer, u32 size, u32 flushFlags);
Result FSFILE_GetSize(Handle handle, u64 *size);
Result FSFILE_SetSize(Handle handle, u64 size);
Result FSFILE_GetAttributes(Handle handle, u32 *attributes);
Result FSFILE_SetAttributes(Handle handle, u32 attributes);
Result FSFILE_Flush(Handle handle);
 
Result FSDIR_Read(Handle handle, u32 *entriesRead, u32 entrycount, FS_dirent *buffer);
Result FSDIR_Close(Handle handle);
 

tvo770

Well-Known Member
Newcomer
Joined
Oct 25, 2008
Messages
90
Trophies
1
XP
406
Country
United States
Okay figure that out but now I have this issue
Code:
C:\3ds>REM === Build ===
 
C:\3ds>make
index.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/index.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=sof
tfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/index.cpp -o index.o
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
c:/3ds/source/index.cpp:5:22: warning: 'index_lua' defined but not used [-Wunuse
d-variable]
static unsigned char index_lua[] __attribute__((aligned(16))) = {
                      ^
luaControls.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaControls.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11
-D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaControls.cpp
-o luaControls.o
luaGraphics.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaGraphics.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11
-D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaGraphics.cpp
-o luaGraphics.o
c:/3ds/source/luaGraphics.cpp: In function 'void DrawScreenText(int, int, char*,
u32, int, int)':
c:/3ds/source/luaGraphics.cpp:130:5: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
u8* buffer;
    ^
c:/3ds/source/luaGraphics.cpp: In function 'void FillScreenRect(int, int, int, i
nt, u32, int, int)':
c:/3ds/source/luaGraphics.cpp:218:6: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
  u8* buffer;
      ^
c:/3ds/source/luaGraphics.cpp: In function 'void FillScreenEmptyRect(int, int, i
nt, int, u32, int, int)':
c:/3ds/source/luaGraphics.cpp:245:6: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
  u8* buffer;
      ^
luaPlayer.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaPlayer.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaPlayer.cpp -o l
uaPlayer.o
c:/3ds/source/luaPlayer.cpp: In function 'const char* runScript(const char*, boo
l)':
c:/3ds/source/luaPlayer.cpp:71:16: warning: deprecated conversion from string co
nstant to 'char*' [-Wwrite-strings]
  char* patch = "dofile = System.dofile\n\
                ^
luaScreen.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaScreen.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaScreen.cpp -o l
uaScreen.o
c:/3ds/source/luaScreen.cpp: In function 'int lua_print(lua_State*)':
c:/3ds/source/luaScreen.cpp:57:15: warning: suggest parentheses around assignmen
t used as truth value [-Wparentheses]
  if (alpha=255) DrawScreenText(x,y,text,color,screen,side);
              ^
c:/3ds/source/luaScreen.cpp: At global scope:
c:/3ds/source/luaScreen.cpp:62:12: warning: 'int lua_enable3D(lua_State*)' defin
ed but not used [-Wunused-function]
static int lua_enable3D(lua_State *L)
            ^
c:/3ds/source/luaScreen.cpp:70:12: warning: 'int lua_disable3D(lua_State*)' defi
ned but not used [-Wunused-function]
static int lua_disable3D(lua_State *L)
            ^
c:/3ds/source/luaScreen.cpp:78:12: warning: 'int lua_get3D(lua_State*)' defined
but not used [-Wunused-function]
static int lua_get3D(lua_State *L)
            ^
luaSystem.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaSystem.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaSystem.cpp -o l
uaSystem.o
c:/3ds/source/luaSystem.cpp: In function 'int lua_openfile(lua_State*)':
c:/3ds/source/luaSystem.cpp:116:66: warning: narrowing conversion of 'archive_id
' from 'u64 {aka long long unsigned int}' to 'u32 {aka long unsigned int}' insid
e { } [-Wnarrowing]
  u32 main_extdata_archive_lowpathdata[3] = {mtype, archive_id, 0};
                                                                  ^
c:/3ds/source/luaSystem.cpp: In function 'int lua_installCia(lua_State*)':
c:/3ds/source/luaSystem.cpp:428:11: warning: comparison between signed and unsig
ned integer expressions [-Wsign-compare]
  if (size < MAX_RAM_ALLOCATION){
          ^
c:/3ds/source/luaSystem.cpp: In function 'int lua_openfile(lua_State*)':
c:/3ds/source/luaSystem.cpp:142:3: warning: 'ret' may be used uninitialized in t
his function [-Wmaybe-uninitialized]
  if(ret) return luaL_error(L, "error opening file");
  ^
main.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/main.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=soft
fp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/main.cpp -o main.o
c:/3ds/source/main.cpp: In function 'int main(int, char**)':
c:/3ds/source/main.cpp:49:10: error: too few arguments to function 'void gfxInit
(GSP_FramebufferFormats, GSP_FramebufferFormats, bool)'
  gfxInit();
          ^
In file included from c:/devkitPro/libctru/include/3ds.h:14:0,
                from c:/3ds/source/main.cpp:36:
c:/devkitPro/libctru/include/3ds/gfx.h:23:6: note: declared here
void gfxInit(GSP_FramebufferFormats topFormat, GSP_FramebufferFormats bottomFor
mat, bool vrambuffers);
      ^
c:/3ds/source/main.cpp:57:9: warning: unused variable 'fileHandle' [-Wunused-var
iable]
  Handle fileHandle;
        ^
c:/3ds/source/main.cpp:58:6: warning: unused variable 'size' [-Wunused-variable]
 
  u64 size;
      ^
c:/3ds/source/main.cpp:59:6: warning: unused variable 'bytesRead' [-Wunused-vari
able]
  u32 bytesRead;
      ^
In file included from c:/3ds/source/main.cpp:39:0:
c:/3ds/source/index.cpp: At global scope:
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
make[1]: *** [main.o] Error 1
make: *** [build] Error 2
 

Apache Thunder

I have cameras in your head!
Member
Joined
Oct 7, 2007
Messages
4,457
Trophies
3
Age
36
Location
Levelland, Texas
Website
www.mariopc.co.nr
XP
6,887
Country
United States
Is there a way to change the import all function to R + Y? L button doesn't work...

Here's the solution to your problem:

Left Right Shoulder Button with Flex Cable For Nintendo 3DS

You'd have to be really poor not to afford that. :P

Search YouTube on how to disassemble a 3DS. I don't think the shoulder buttons are that complicated of a process to replace. I find them easier to work with then the DS/DS Lite and the button part is actually replaceable because they are attached to the motherboard via connector cables. (they were soldered directly onto the motherboard for the DS/DS Lite)

So they won't be too big a problem to replace.
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
Okay figure that out but now I have this issue
Code:
C:\3ds>REM === Build ===
 
C:\3ds>make
index.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/index.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=sof
tfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/index.cpp -o index.o
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
c:/3ds/source/index.cpp:5:22: warning: 'index_lua' defined but not used [-Wunuse
d-variable]
static unsigned char index_lua[] __attribute__((aligned(16))) = {
                      ^
luaControls.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaControls.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11
-D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaControls.cpp
-o luaControls.o
luaGraphics.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaGraphics.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11
-D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaGraphics.cpp
-o luaGraphics.o
c:/3ds/source/luaGraphics.cpp: In function 'void DrawScreenText(int, int, char*,
u32, int, int)':
c:/3ds/source/luaGraphics.cpp:130:5: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
u8* buffer;
    ^
c:/3ds/source/luaGraphics.cpp: In function 'void FillScreenRect(int, int, int, i
nt, u32, int, int)':
c:/3ds/source/luaGraphics.cpp:218:6: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
  u8* buffer;
      ^
c:/3ds/source/luaGraphics.cpp: In function 'void FillScreenEmptyRect(int, int, i
nt, int, u32, int, int)':
c:/3ds/source/luaGraphics.cpp:245:6: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
  u8* buffer;
      ^
luaPlayer.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaPlayer.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaPlayer.cpp -o l
uaPlayer.o
c:/3ds/source/luaPlayer.cpp: In function 'const char* runScript(const char*, boo
l)':
c:/3ds/source/luaPlayer.cpp:71:16: warning: deprecated conversion from string co
nstant to 'char*' [-Wwrite-strings]
  char* patch = "dofile = System.dofile\n\
                ^
luaScreen.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaScreen.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaScreen.cpp -o l
uaScreen.o
c:/3ds/source/luaScreen.cpp: In function 'int lua_print(lua_State*)':
c:/3ds/source/luaScreen.cpp:57:15: warning: suggest parentheses around assignmen
t used as truth value [-Wparentheses]
  if (alpha=255) DrawScreenText(x,y,text,color,screen,side);
              ^
c:/3ds/source/luaScreen.cpp: At global scope:
c:/3ds/source/luaScreen.cpp:62:12: warning: 'int lua_enable3D(lua_State*)' defin
ed but not used [-Wunused-function]
static int lua_enable3D(lua_State *L)
            ^
c:/3ds/source/luaScreen.cpp:70:12: warning: 'int lua_disable3D(lua_State*)' defi
ned but not used [-Wunused-function]
static int lua_disable3D(lua_State *L)
            ^
c:/3ds/source/luaScreen.cpp:78:12: warning: 'int lua_get3D(lua_State*)' defined
but not used [-Wunused-function]
static int lua_get3D(lua_State *L)
            ^
luaSystem.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaSystem.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaSystem.cpp -o l
uaSystem.o
c:/3ds/source/luaSystem.cpp: In function 'int lua_openfile(lua_State*)':
c:/3ds/source/luaSystem.cpp:116:66: warning: narrowing conversion of 'archive_id
' from 'u64 {aka long long unsigned int}' to 'u32 {aka long unsigned int}' insid
e { } [-Wnarrowing]
  u32 main_extdata_archive_lowpathdata[3] = {mtype, archive_id, 0};
                                                                  ^
c:/3ds/source/luaSystem.cpp: In function 'int lua_installCia(lua_State*)':
c:/3ds/source/luaSystem.cpp:428:11: warning: comparison between signed and unsig
ned integer expressions [-Wsign-compare]
  if (size < MAX_RAM_ALLOCATION){
          ^
c:/3ds/source/luaSystem.cpp: In function 'int lua_openfile(lua_State*)':
c:/3ds/source/luaSystem.cpp:142:3: warning: 'ret' may be used uninitialized in t
his function [-Wmaybe-uninitialized]
  if(ret) return luaL_error(L, "error opening file");
  ^
main.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/main.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=soft
fp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/main.cpp -o main.o
c:/3ds/source/main.cpp: In function 'int main(int, char**)':
c:/3ds/source/main.cpp:49:10: error: too few arguments to function 'void gfxInit
(GSP_FramebufferFormats, GSP_FramebufferFormats, bool)'
  gfxInit();
          ^
In file included from c:/devkitPro/libctru/include/3ds.h:14:0,
                from c:/3ds/source/main.cpp:36:
c:/devkitPro/libctru/include/3ds/gfx.h:23:6: note: declared here
void gfxInit(GSP_FramebufferFormats topFormat, GSP_FramebufferFormats bottomFor
mat, bool vrambuffers);
      ^
c:/3ds/source/main.cpp:57:9: warning: unused variable 'fileHandle' [-Wunused-var
iable]
  Handle fileHandle;
        ^
c:/3ds/source/main.cpp:58:6: warning: unused variable 'size' [-Wunused-variable]
 
  u64 size;
      ^
c:/3ds/source/main.cpp:59:6: warning: unused variable 'bytesRead' [-Wunused-vari
able]
  u32 bytesRead;
      ^
In file included from c:/3ds/source/main.cpp:39:0:
c:/3ds/source/index.cpp: At global scope:
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
make[1]: *** [main.o] Error 1
make: *** [build] Error 2

Replace gfxInit calls with gfxInitDefault.
 

tvo770

Well-Known Member
Newcomer
Joined
Oct 25, 2008
Messages
90
Trophies
1
XP
406
Country
United States
So close yet so far.
Code:
C:\3ds>REM === Build ===
 
C:\3ds>make
index.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/index.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=har
d -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/index.cpp -o index.o
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
c:/3ds/source/index.cpp:5:22: warning: 'index_lua' defined but not used [-Wunuse
d-variable]
static unsigned char index_lua[] __attribute__((aligned(16))) = {
                      ^
luaControls.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaControls.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=hard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaControls.cpp -o
luaControls.o
luaGraphics.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaGraphics.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=hard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaGraphics.cpp -o
luaGraphics.o
c:/3ds/source/luaGraphics.cpp: In function 'void DrawScreenText(int, int, char*,
u32, int, int)':
c:/3ds/source/luaGraphics.cpp:130:5: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
u8* buffer;
    ^
c:/3ds/source/luaGraphics.cpp: In function 'void FillScreenRect(int, int, int, i
nt, u32, int, int)':
c:/3ds/source/luaGraphics.cpp:218:6: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
  u8* buffer;
      ^
c:/3ds/source/luaGraphics.cpp: In function 'void FillScreenEmptyRect(int, int, i
nt, int, u32, int, int)':
c:/3ds/source/luaGraphics.cpp:245:6: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
  u8* buffer;
      ^
luaPlayer.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaPlayer.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=hard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaPlayer.cpp -o lua
Player.o
c:/3ds/source/luaPlayer.cpp: In function 'const char* runScript(const char*, boo
l)':
c:/3ds/source/luaPlayer.cpp:71:16: warning: deprecated conversion from string co
nstant to 'char*' [-Wwrite-strings]
  char* patch = "dofile = System.dofile\n\
                ^
luaScreen.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaScreen.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=hard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaScreen.cpp -o lua
Screen.o
c:/3ds/source/luaScreen.cpp: In function 'int lua_print(lua_State*)':
c:/3ds/source/luaScreen.cpp:57:15: warning: suggest parentheses around assignmen
t used as truth value [-Wparentheses]
  if (alpha=255) DrawScreenText(x,y,text,color,screen,side);
              ^
c:/3ds/source/luaScreen.cpp: At global scope:
c:/3ds/source/luaScreen.cpp:62:12: warning: 'int lua_enable3D(lua_State*)' defin
ed but not used [-Wunused-function]
static int lua_enable3D(lua_State *L)
            ^
c:/3ds/source/luaScreen.cpp:70:12: warning: 'int lua_disable3D(lua_State*)' defi
ned but not used [-Wunused-function]
static int lua_disable3D(lua_State *L)
            ^
c:/3ds/source/luaScreen.cpp:78:12: warning: 'int lua_get3D(lua_State*)' defined
but not used [-Wunused-function]
static int lua_get3D(lua_State *L)
            ^
luaSystem.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaSystem.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=hard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaSystem.cpp -o lua
System.o
c:/3ds/source/luaSystem.cpp: In function 'int lua_openfile(lua_State*)':
c:/3ds/source/luaSystem.cpp:116:66: warning: narrowing conversion of 'archive_id
' from 'u64 {aka long long unsigned int}' to 'u32 {aka long unsigned int}' insid
e { } [-Wnarrowing]
  u32 main_extdata_archive_lowpathdata[3] = {mtype, archive_id, 0};
                                                                  ^
c:/3ds/source/luaSystem.cpp: In function 'int lua_installCia(lua_State*)':
c:/3ds/source/luaSystem.cpp:428:11: warning: comparison between signed and unsig
ned integer expressions [-Wsign-compare]
  if (size < MAX_RAM_ALLOCATION){
          ^
c:/3ds/source/luaSystem.cpp: In function 'int lua_openfile(lua_State*)':
c:/3ds/source/luaSystem.cpp:142:3: warning: 'ret' may be used uninitialized in t
his function [-Wmaybe-uninitialized]
  if(ret) return luaL_error(L, "error opening file");
  ^
main.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/main.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard
-I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS -
fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/main.cpp -o main.o
c:/3ds/source/main.cpp: In function 'int main(int, char**)':
c:/3ds/source/main.cpp:57:9: warning: unused variable 'fileHandle' [-Wunused-var
iable]
  Handle fileHandle;
        ^
c:/3ds/source/main.cpp:58:6: warning: unused variable 'size' [-Wunused-variable]
 
  u64 size;
      ^
c:/3ds/source/main.cpp:59:6: warning: unused variable 'bytesRead' [-Wunused-vari
able]
  u32 bytesRead;
      ^
In file included from c:/3ds/source/main.cpp:39:0:
c:/3ds/source/index.cpp: At global scope:
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
lapi.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lapi.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard
-I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS -
c /c/3ds/source/include/lua/lapi.c -o lapi.o
lauxlib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lauxlib.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=h
ard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/lauxlib.c -o lauxlib.o
lbaselib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lbaselib.d -g -Wall -O2 -mword-reloc
ations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=
hard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/lbaselib.c -o lbaselib.o
lbitlib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lbitlib.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=h
ard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/lbitlib.c -o lbitlib.o
lcode.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lcode.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=har
d -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/lcode.c -o lcode.o
lcorolib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lcorolib.d -g -Wall -O2 -mword-reloc
ations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=
hard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/lcorolib.c -o lcorolib.o
lctype.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lctype.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=ha
rd -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/lctype.c -o lctype.o
ldblib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ldblib.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=ha
rd -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/ldblib.c -o ldblib.o
ldebug.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ldebug.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=ha
rd -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/ldebug.c -o ldebug.o
ldo.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ldo.d -g -Wall -O2 -mword-relocation
s -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard
-I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS -c
/c/3ds/source/include/lua/ldo.c -o ldo.o
ldump.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ldump.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=har
d -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/ldump.c -o ldump.o
lfunc.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lfunc.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=har
d -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/lfunc.c -o lfunc.o
lgc.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lgc.d -g -Wall -O2 -mword-relocation
s -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard
-I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS -c
/c/3ds/source/include/lua/lgc.c -o lgc.o
linit.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/linit.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=har
d -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/linit.c -o linit.o
liolib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/liolib.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=ha
rd -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/liolib.c -o liolib.o
llex.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/llex.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard
-I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS -
c /c/3ds/source/include/lua/llex.c -o llex.o
lmathlib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lmathlib.d -g -Wall -O2 -mword-reloc
ations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=
hard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/lmathlib.c -o lmathlib.o
lmem.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lmem.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard
-I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS -
c /c/3ds/source/include/lua/lmem.c -o lmem.o
loadlib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/loadlib.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=h
ard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/loadlib.c -o loadlib.o
lobject.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lobject.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=h
ard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/lobject.c -o lobject.o
lopcodes.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lopcodes.d -g -Wall -O2 -mword-reloc
ations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=
hard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/lopcodes.c -o lopcodes.o
loslib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/loslib.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=ha
rd -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/loslib.c -o loslib.o
lparser.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lparser.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=h
ard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/lparser.c -o lparser.o
lstate.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lstate.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=ha
rd -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/lstate.c -o lstate.o
lstring.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lstring.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=h
ard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/lstring.c -o lstring.o
lstrlib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lstrlib.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=h
ard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/lstrlib.c -o lstrlib.o
ltable.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ltable.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=ha
rd -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/ltable.c -o ltable.o
ltablib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ltablib.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=h
ard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/ltablib.c -o ltablib.o
ltm.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ltm.d -g -Wall -O2 -mword-relocation
s -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard
-I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS -c
/c/3ds/source/include/lua/ltm.c -o ltm.o
lundump.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lundump.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=h
ard -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/lundump.c -o lundump.o
lvm.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lvm.d -g -Wall -O2 -mword-relocation
s -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard
-I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS -c
/c/3ds/source/include/lua/lvm.c -o lvm.o
lzio.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lzio.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard
-I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS -
c /c/3ds/source/include/lua/lzio.c -o lzio.o
linking 3ds.elf
luaPlayer.o: In function `runScript(char const*, bool)':
c:/3ds/source/luaPlayer.cpp:55: undefined reference to `CSND_initialize'
c:/3ds/source/luaPlayer.cpp:56: undefined reference to `CSND_shutdown'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/3ds/3ds.elf] Error 1
make: *** [build] Error 2
 

Lenan

Well-Known Member
Member
Joined
Feb 1, 2015
Messages
172
Trophies
0
Age
32
XP
142
Country
Swaziland
You didn't add this to csnd.h
Code:
Result CSND_initialize(int* x);
void CSND_shutdown();
 

tvo770

Well-Known Member
Newcomer
Joined
Oct 25, 2008
Messages
90
Trophies
1
XP
406
Country
United States
You didn't add this to csnd.h
Code:
Result CSND_initialize(int* x);
void CSND_shutdown();
i thought i did. here's what my csnd.h
Code:
#pragma once
#include <3ds/types.h>
 
#define CSND_NUM_CHANNELS 32
#define CSND_SHAREDMEM_DEFAULT 0x10004000
 
#define CSND_TIMER(n) (0x3FEC3FC / ((u32)(n)))
 
#define CSND_ENCODING_IMA_ADPCM 0
#define CSND_LOOP_ENABLE 0
 
enum
{
    CSND_ENCODING_PCM8 = 0,
    CSND_ENCODING_PCM16,
    CSND_ENCODING_ADPCM, // IMA-ADPCM
    CSND_ENCODING_PSG, // Similar to DS?
};
 
enum
{
    CSND_LOOPMODE_MANUAL = 0,
    CSND_LOOPMODE_NORMAL,
    CSND_LOOPMODE_ONESHOT,
    CSND_LOOPMODE_NORELOAD,
};
 
#define SOUND_CHANNEL(n) ((u32)(n) & 0x1F)
#define SOUND_FORMAT(n) ((u32)(n) << 12)
#define SOUND_LOOPMODE(n) ((u32)(n) << 10)
 
enum
{
    SOUND_LINEAR_INTERP = BIT(6),
    SOUND_REPEAT = SOUND_LOOPMODE(CSND_LOOPMODE_NORMAL),
    SOUND_ONE_SHOT = SOUND_LOOPMODE(CSND_LOOPMODE_ONESHOT),
    SOUND_FORMAT_8BIT = SOUND_FORMAT(CSND_ENCODING_PCM8),
    SOUND_FORMAT_16BIT = SOUND_FORMAT(CSND_ENCODING_PCM16),
    SOUND_FORMAT_ADPCM = SOUND_FORMAT(CSND_ENCODING_ADPCM),
    SOUND_FORMAT_PSG = SOUND_FORMAT(CSND_ENCODING_PSG),
    SOUND_ENABLE = BIT(14),
};
 
// Duty cycles for a PSG channel
enum
{
    DutyCycle_0  = 7, /*!<  0.0% duty cycle */
    DutyCycle_12 = 0, /*!<  12.5% duty cycle */
    DutyCycle_25 = 1, /*!<  25.0% duty cycle */
    DutyCycle_37 = 2, /*!<  37.5% duty cycle */
    DutyCycle_50 = 3, /*!<  50.0% duty cycle */
    DutyCycle_62 = 4, /*!<  62.5% duty cycle */
    DutyCycle_75 = 5, /*!<  75.0% duty cycle */
    DutyCycle_87 = 6  /*!<  87.5% duty cycle */
};
 
typedef union
{
    u32 value[3];
    struct
    {
        u8 active;
        u8 _pad1;
        u16 _pad2;
        s16 adpcmSample;
        u8 adpcmIndex;
        u8 _pad3;
        u32 samplePAddr;
    };
} CSND_ChnInfo;
 
// See here regarding CSND shared-mem commands, etc: http://3dbrew.org/wiki/CSND_Shared_Memory
 
extern vu32* csndSharedMem;
extern u32 csndSharedMemSize;
extern u32 csndChannels; // Bitmask of channels that are allowed for usage
 
Result CSND_AcquireCapUnit(u32* capUnit);
Result CSND_ReleaseCapUnit(u32 capUnit);
Result CSND_initialize(int* x);
 
Result csndInit(void);
Result csndExit(void);
 
void csndWriteCmd(int cmdid, u8 *cmdparams);
Result csndExecCmds(bool waitDone);
 
void CSND_SetPlayStateR(u32 channel, u32 value);
void CSND_SetPlayState(u32 channel, u32 value);
void CSND_SetBlock(u32 channel, int block, u32 physaddr, u32 size);
void CSND_SetVol(u32 channel, u16 left, u16 right);
void CSND_SetTimer(u32 channel, u32 timer);
void CSND_SetDuty(u32 channel, u32 duty);
void CSND_SetAdpcmState(u32 channel, int block, int sample, int index);
void CSND_SetAdpcmReload(u32 channel, bool reload);
void CSND_SetChnRegs(u32 flags, u32 physaddr0, u32 physaddr1, u32 totalbytesize);
 
void CSND_CapEnable(u32 capUnit, bool enable);
void CSND_CapSetBit(u32 capUnit, int bit, bool state); // Sets bit0..2 in the CNT register, purpose currently unknown
void CSND_CapSetTimer(u32 capUnit, u32 timer);
void CSND_CapSetBuffer(u32 capUnit, u32 paddr, u32 size);
 
Result CSND_UpdateInfo(bool waitDone);
 
Result csndPlaySound(int chn, u32 flags, u32 sampleRate, void* data0, void* data1, u32 size);
 
CSND_ChnInfo* csndGetChnInfo(u32 channel); // Requires previous CSND_UpdateInfo()
 
Result csndGetState(u32 channel, CSND_ChnInfo* out);
Result csndIsPlaying(u32 channel, u8* status);
 
void CSND_shutdown();
void CSND_writesharedmem_cmdtype0(u32 hex, u8* cmdparams);
void CSND_sharedmemtype0_cmde(u32 channel, bool loop, u32 encoding, u32 samplerate, u8 x, u8 y, u32 physaddr0, u32 physaddr1, u32 size);
void CSND_sharedmemtype0_cmd8(u32 channel, u32 samplerate);
void CSND_sharedmemtype0_cmd3(u32 channel, u32 physaddr1, u32 size);
void CSND_sharedmemtype0_cmdupdatestate(int x);
void My_CSND_playsound(u32 x, u32 y, u32 z, u32 a, u32* b, u32* c, u32 d, u32 e, u32 f);
void CSND_playbackstate(int channel, int x);
void CSND_setchannel_playbackstate(int channel, int x);
 

tvo770

Well-Known Member
Newcomer
Joined
Oct 25, 2008
Messages
90
Trophies
1
XP
406
Country
United States
after messing with something they managed to get a different error.
Code:
C:\3ds>REM === Build ===
 
C:\3ds>make
index.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/index.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=sof
tfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/index.cpp -o index.o
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
c:/3ds/source/index.cpp:5:22: warning: 'index_lua' defined but not used [-Wunuse
d-variable]
static unsigned char index_lua[] __attribute__((aligned(16))) = {
                      ^
luaControls.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaControls.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11
-D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaControls.cpp
-o luaControls.o
luaGraphics.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaGraphics.d -g -Wall -O2 -mword-re
locations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-a
bi=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11
-D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaGraphics.cpp
-o luaGraphics.o
c:/3ds/source/luaGraphics.cpp: In function 'void DrawScreenText(int, int, char*,
u32, int, int)':
c:/3ds/source/luaGraphics.cpp:130:5: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
u8* buffer;
    ^
c:/3ds/source/luaGraphics.cpp: In function 'void FillScreenRect(int, int, int, i
nt, u32, int, int)':
c:/3ds/source/luaGraphics.cpp:218:6: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
  u8* buffer;
      ^
c:/3ds/source/luaGraphics.cpp: In function 'void FillScreenEmptyRect(int, int, i
nt, int, u32, int, int)':
c:/3ds/source/luaGraphics.cpp:245:6: warning: 'buffer' may be used uninitialized
in this function [-Wmaybe-uninitialized]
  u8* buffer;
      ^
luaPlayer.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaPlayer.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaPlayer.cpp -o l
uaPlayer.o
c:/3ds/source/luaPlayer.cpp: In function 'const char* runScript(const char*, boo
l)':
c:/3ds/source/luaPlayer.cpp:71:16: warning: deprecated conversion from string co
nstant to 'char*' [-Wwrite-strings]
  char* patch = "dofile = System.dofile\n\
                ^
luaScreen.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaScreen.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaScreen.cpp -o l
uaScreen.o
c:/3ds/source/luaScreen.cpp: In function 'int lua_print(lua_State*)':
c:/3ds/source/luaScreen.cpp:57:15: warning: suggest parentheses around assignmen
t used as truth value [-Wparentheses]
  if (alpha=255) DrawScreenText(x,y,text,color,screen,side);
              ^
c:/3ds/source/luaScreen.cpp: At global scope:
c:/3ds/source/luaScreen.cpp:62:12: warning: 'int lua_enable3D(lua_State*)' defin
ed but not used [-Wunused-function]
static int lua_enable3D(lua_State *L)
            ^
c:/3ds/source/luaScreen.cpp:70:12: warning: 'int lua_disable3D(lua_State*)' defi
ned but not used [-Wunused-function]
static int lua_disable3D(lua_State *L)
            ^
c:/3ds/source/luaScreen.cpp:78:12: warning: 'int lua_get3D(lua_State*)' defined
but not used [-Wunused-function]
static int lua_get3D(lua_State *L)
            ^
luaSystem.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/luaSystem.d -g -Wall -O2 -mword-relo
cations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi
=softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -
D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/luaSystem.cpp -o l
uaSystem.o
c:/3ds/source/luaSystem.cpp: In function 'int lua_openfile(lua_State*)':
c:/3ds/source/luaSystem.cpp:116:66: warning: narrowing conversion of 'archive_id
' from 'u64 {aka long long unsigned int}' to 'u32 {aka long unsigned int}' insid
e { } [-Wnarrowing]
  u32 main_extdata_archive_lowpathdata[3] = {mtype, archive_id, 0};
                                                                  ^
c:/3ds/source/luaSystem.cpp: In function 'int lua_installCia(lua_State*)':
c:/3ds/source/luaSystem.cpp:428:11: warning: comparison between signed and unsig
ned integer expressions [-Wsign-compare]
  if (size < MAX_RAM_ALLOCATION){
          ^
c:/3ds/source/luaSystem.cpp: In function 'int lua_openfile(lua_State*)':
c:/3ds/source/luaSystem.cpp:142:3: warning: 'ret' may be used uninitialized in t
his function [-Wmaybe-uninitialized]
  if(ret) return luaL_error(L, "error opening file");
  ^
main.cpp
arm-none-eabi-g++ -MMD -MP -MF /c/3ds/build/main.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=soft
fp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-fno-rtti -fno-exceptions -std=gnu++11 -c /c/3ds/source/main.cpp -o main.o
c:/3ds/source/main.cpp: In function 'int main(int, char**)':
c:/3ds/source/main.cpp:57:9: warning: unused variable 'fileHandle' [-Wunused-var
iable]
  Handle fileHandle;
        ^
c:/3ds/source/main.cpp:58:6: warning: unused variable 'size' [-Wunused-variable]
 
  u64 size;
      ^
c:/3ds/source/main.cpp:59:6: warning: unused variable 'bytesRead' [-Wunused-vari
able]
  u32 bytesRead;
      ^
In file included from c:/3ds/source/main.cpp:39:0:
c:/3ds/source/index.cpp: At global scope:
c:/3ds/source/index.cpp:4:21: warning: 'size_index_lua' defined but not used [-W
unused-variable]
static unsigned int size_index_lua = 11416;
                    ^
lapi.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lapi.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=soft
fp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/lapi.c -o lapi.o
lauxlib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lauxlib.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=s
oftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -c /c/3ds/source/include/lua/lauxlib.c -o lauxlib.o
lbaselib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lbaselib.d -g -Wall -O2 -mword-reloc
ations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=
softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D
_3DS -c /c/3ds/source/include/lua/lbaselib.c -o lbaselib.o
lbitlib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lbitlib.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=s
oftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -c /c/3ds/source/include/lua/lbitlib.c -o lbitlib.o
lcode.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lcode.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=sof
tfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/lcode.c -o lcode.o
lcorolib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lcorolib.d -g -Wall -O2 -mword-reloc
ations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=
softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D
_3DS -c /c/3ds/source/include/lua/lcorolib.c -o lcorolib.o
lctype.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lctype.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=so
ftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/lctype.c -o lctype.o
ldblib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ldblib.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=so
ftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/ldblib.c -o ldblib.o
ldebug.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ldebug.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=so
ftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/ldebug.c -o ldebug.o
ldo.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ldo.d -g -Wall -O2 -mword-relocation
s -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softf
p -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/ldo.c -o ldo.o
ldump.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ldump.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=sof
tfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/ldump.c -o ldump.o
lfunc.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lfunc.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=sof
tfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/lfunc.c -o lfunc.o
lgc.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lgc.d -g -Wall -O2 -mword-relocation
s -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softf
p -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/lgc.c -o lgc.o
linit.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/linit.d -g -Wall -O2 -mword-relocati
ons -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=sof
tfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3D
S -c /c/3ds/source/include/lua/linit.c -o linit.o
liolib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/liolib.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=so
ftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/liolib.c -o liolib.o
llex.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/llex.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=soft
fp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/llex.c -o llex.o
lmathlib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lmathlib.d -g -Wall -O2 -mword-reloc
ations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=
softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D
_3DS -c /c/3ds/source/include/lua/lmathlib.c -o lmathlib.o
lmem.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lmem.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=soft
fp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/lmem.c -o lmem.o
loadlib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/loadlib.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=s
oftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -c /c/3ds/source/include/lua/loadlib.c -o loadlib.o
lobject.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lobject.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=s
oftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -c /c/3ds/source/include/lua/lobject.c -o lobject.o
lopcodes.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lopcodes.d -g -Wall -O2 -mword-reloc
ations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=
softfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D
_3DS -c /c/3ds/source/include/lua/lopcodes.c -o lopcodes.o
loslib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/loslib.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=so
ftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/loslib.c -o loslib.o
lparser.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lparser.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=s
oftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -c /c/3ds/source/include/lua/lparser.c -o lparser.o
lstate.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lstate.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=so
ftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/lstate.c -o lstate.o
lstring.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lstring.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=s
oftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -c /c/3ds/source/include/lua/lstring.c -o lstring.o
lstrlib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lstrlib.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=s
oftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -c /c/3ds/source/include/lua/lstrlib.c -o lstrlib.o
ltable.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ltable.d -g -Wall -O2 -mword-relocat
ions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=so
ftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3
DS -c /c/3ds/source/include/lua/ltable.c -o ltable.o
ltablib.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ltablib.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=s
oftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -c /c/3ds/source/include/lua/ltablib.c -o ltablib.o
ltm.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/ltm.d -g -Wall -O2 -mword-relocation
s -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softf
p -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/ltm.c -o ltm.o
lundump.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lundump.d -g -Wall -O2 -mword-reloca
tions -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=s
oftfp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_
3DS -c /c/3ds/source/include/lua/lundump.c -o lundump.o
lvm.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lvm.d -g -Wall -O2 -mword-relocation
s -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softf
p -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/lvm.c -o lvm.o
lzio.c
arm-none-eabi-gcc -MMD -MP -MF /c/3ds/build/lzio.d -g -Wall -O2 -mword-relocatio
ns -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=soft
fp -I/c/3ds/include -I/c/devkitPro/libctru/include -I/c/3ds/build -DARM11 -D_3DS
-c /c/3ds/source/include/lua/lzio.c -o lzio.o
linking 3ds.elf
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-e
abi/bin/ld.exe: cannot find 3dsx_crt0.o: No such file or directory
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/3ds/3ds.elf] Error 1
make: *** [build] Error 2
 
C:\3ds>REM === pause if there were errors ===
 
C:\3ds>if 2 NEQ 0 pause
Press any key to continue . . .
 

Lenan

Well-Known Member
Member
Joined
Feb 1, 2015
Messages
172
Trophies
0
Age
32
XP
142
Country
Swaziland
I have a feeling that you don't have ctrulib in your environment variables.
Start -> right click on Computer -> properties -> advanced system settings (on the left) -> environment variables. Check if you have CTRULIB and if it points to libctru in your devkit folder
 

tvo770

Well-Known Member
Newcomer
Joined
Oct 25, 2008
Messages
90
Trophies
1
XP
406
Country
United States
I have a feeling that you don't have ctrulib in your environment variables.
Start -> right click on Computer -> properties -> advanced system settings (on the left) -> environment variables. Check if you have CTRULIB and if it points to libctru in your devkit folder

This is what I have in my environment variables.
CTRULIB
/c/devkitPro/libctru
 

KazoWAR

Well-Known Member
Member
Joined
Aug 12, 2008
Messages
1,952
Trophies
1
Age
35
Location
Winter Haven
XP
2,135
Country
United States
I have 9GB free on my SD card, but big red menu is reporting 1.3 GB free. I was trying to install a 1.8 GB cia but it wont let me, i guess since it thinks there is not enough free space.
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
I have 9GB free on my SD card, but big red menu is reporting 1.3 GB free. I was trying to install a 1.8 GB cia but it wont let me, i guess since it thinks there is not enough free space.

Mmmhhh there is something wrong in libctru, i'll add for next release a "Skip Free SD check".
 
D

Deleted User

Guest
Mmmhhh there is something wrong in libctru, i'll add for next release a "Skip Free SD check".


Actually, your code is likely at fault here. Here, you are multiplying the block size and the number of free blocks, both as 32-bit integers. However, 9GB in bytes is a number too big to be held by a 32-bit integer. You should cast one or both of these values to a 64-bit integer before multiplying.

Code example with output: http://ideone.com/tWOGy1
 
  • Like
Reactions: Rinnegatamante

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
Actually, your code is likely at fault here. Here, you are multiplying the block size and the number of free blocks, both as 32-bit integers. However, 9GB in bytes is a number too big to be held by a 32-bit integer. You should cast one or both of these values to a 64-bit integer before multiplying.

Code example with output: http://ideone.com/tWOGy1

You're right but LUA interpreter doesn't support 64 bit integers so i have to do something different (like pushing an offset to an u64 or converting it to a string).
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BakerMan @ BakerMan: this one +1