gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > !!!!!!!!libcartreset help needed!!!!!! EDITED POST w/NEWINFO

#121006 - tondopie - Thu Mar 08, 2007 3:08 am

I have been trying out the new libcartreset and i've had some problems. I try comiling my app and it comes up with this when compiling the ARM7 source:

Code:
e:/ndsdev/boot_app_mmd/arm7/source/main.c: In function 'main':
e:/ndsdev/boot_app_mmd/arm7/source/main.c:9: warning: implicit declaration of function 'passmeloopQuery'
e:/ndsdev/boot_app_mmd/arm7/source/main.c:10: warning: implicit declaration of function 'cartExecute'
arm-eabi-g++ -g -mthumb-interwork -mno-fpu -L/e/devkitPro/PAlib/lib -specs=ds_arm9.specs main.o -Le:/devkitPro/PAlib//lib -lpa7 -L/e/devkitPro/libnds/lib -lcartreset_nolibfat7.a -lnds7 -ldswifi7 -o build.elf
e:/devkitpro/devkitarm/bin/../lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/bin/ld.exe: cannot find -lcartreset_nolibfat7.a
collect2: ld returned 1 exit status



is this a problem with r20? I have include the <cartreset_nolibfat.h> into the ARM7 source.

Here's my code:
Code:
#include <nds.h>
#include <cartreset_nolibfat.h>

int main(int argc, char ** argv)
{
      
   while(1)
    {
        if(passmeloopQuery())       // If ARM9 has enter the PassMe loop..
            cartExecute();          // .. reset!
        swiWaitForVBlank();
    }
}


Last edited by tondopie on Sat Mar 10, 2007 11:45 pm; edited 3 times in total

#121014 - wintermute - Thu Mar 08, 2007 5:30 am

tondopie wrote:

is this a problem with r20? I have include the <cartreset_nolibfat.h> into the ARM7 source.



No, it's what's known as a PEBKAC.

This

Code:
In function 'main':
e:/ndsdev/boot_app_mmd/arm7/source/main.c:9: warning: implicit declaration of function 'passmeloopQuery'


and this

Code:

cannot find -lcartreset_nolibfat7.a
collect2: ld returned 1 exit status


indicate that you haven't actually put the libcartreset files anywhere the compiler can find them.

Putting cartreset_nolibfat7.a in e:/devkitPro/libnds/lib and cartreset_nolibfat.h in e:/devkitPro/libnds/include would probably help rather a lot.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog


Last edited by wintermute on Fri Mar 09, 2007 12:10 am; edited 1 time in total

#121025 - Sektor - Thu Mar 08, 2007 8:10 am

Open your makefile and change

LIBS := -lcartreset_nolibfat7.a

to:

LIBS := -lcartreset_nolibfat7

The compiler adds .a extension on it's own.
_________________
GTAMP.com/DS

#121088 - tondopie - Thu Mar 08, 2007 8:30 pm

Sektor wrote:
Open your makefile and change

LIBS := -lcartreset_nolibfat7.a

to:

LIBS := -lcartreset_nolibfat7

The compiler adds .a extension on it's own.



the makefile I took makes a .nds binary for the ARM9 and ARM7. i don't have any idea how to make a makefile. can someone make me a makefile for my project so I can compile it. I will give them the source. just PM or email me at tondopie@gmail.com


Last edited by tondopie on Thu Mar 08, 2007 9:07 pm; edited 1 time in total

#121093 - Lick - Thu Mar 08, 2007 9:00 pm

Sektor is correct. I wrote the readme in a rush so it's probably wrong.
_________________
http://licklick.wordpress.com

#121109 - tondopie - Fri Mar 09, 2007 12:42 am

[Previous contents deleted]

I edit the source so that it only shows what it will look like.

In side the download is my plee for help. I think it's a problem with my makefile, because I can't make makefiles. Here's what my first version will look like.

Download Right Host