Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Up until recently, I've been using the VS.NET plugin to generate makefiles for gcc. However, ever since a major restructuring of the code, that button no longer does anything.

Previously, the structure looked like this:

appdir
|-app.sln
|-app.vcproj
|-app.c
|-app.h
|-many more .c files
|-many more .h files

That got too cumbersome, particularly since there are three distinct applets being developed, all piled into the same .dll/.mod. I got problems with conflicting resource definitions and so forth, so I decided to turn two of the applets into static libraries and leave the third as a dependent of those two. So, now it looks like this:

solutiondir
|-app.sln
|-app0dir
| |-app0.vcproj
| |-app0.c
| |-app0.h
| |-a few more .c files
| |-a few more .h files
|-app1dir
| |-app1.vcproj
| |-app1.c
| |-app1.h
| |-a few more .c files
| |-a few more .h files
|-app2dir
|-app2.vcproj
|-app2.c
|-app2.h
|-a few more .c files
|-a few more .h files

Surprise, surprise, the generate makefile button no longer works.

Now, of course I don't expect it to generate a single makefile to account for the whole solution, but does anyone know of a way I could get it to generate a makefile for each individual project? I can take it the rest of the way from there.

Whoa, hey, whaddya know, I figgered it out.
Instead of lumping all three projects into a single solution, I decided to try using three different single-project solutions. For some reason, that works.
'Course, the makefiles generated are all for creating .mod files, and I'll have to modify them a bit to get the whole thing working, but it's looking good.

Whoa, hey, whaddya know, I figgered it out.
Instead of lumping all three projects into a single solution, I decided to try using three different single-project solutions. For some reason, that works.
'Course, the makefiles generated are all for creating .mod files, and I'll have to modify them a bit to get the whole thing working, but it's looking good.

Well, I think I got the makefiles working; I mean, everything compiles and links properly, and I get a .mod out of it.
However, there's a new problem here: when I start the app on the actual hardware (T720), I get an error message "Unknown Error (4)". Anyone have any clue what that means?

Well, I think I got the makefiles working; I mean, everything compiles and links properly, and I get a .mod out of it.
However, there's a new problem here: when I start the app on the actual hardware (T720), I get an error message "Unknown Error (4)". Anyone have any clue what that means?

When I was struggling with "Unknown error (4)" on Monday, the problem seemed to be bad code of some sort (I was trying to use gcc at the time, and it was not producing the correct ARM code or something.) Perhaps the new Makefile didn't combine the multiple MOD files together into a valid file? Just guessing.
Kelton

When I was struggling with "Unknown error (4)" on Monday, the problem seemed to be bad code of some sort (I was trying to use gcc at the time, and it was not producing the correct ARM code or something.) Perhaps the new Makefile didn't combine the multiple MOD files together into a valid file? Just guessing.
Kelton

It's possible; can you think of anything wrong with my methodology?
Three makefiles... the first two use arm-elf-ar to create libraries from two of the three applets, and the third uses those two libraries plus the code from the third applet to construct the .mod file. GCCResolver, AEEAppGen, and AEEModGen only show up in the third makefile, which is where all the linking occurs.

It's possible; can you think of anything wrong with my methodology?
Three makefiles... the first two use arm-elf-ar to create libraries from two of the three applets, and the third uses those two libraries plus the code from the third applet to construct the .mod file. GCCResolver, AEEAppGen, and AEEModGen only show up in the third makefile, which is where all the linking occurs.

I remember somewhere several posts about AEEAppGen.o having to be the first module in the link. Is it in one of the libraries, and landed somewhere else?
Seems to me that the order of files being significant is pure voodoo and a sign of something rotten in the state of Denmark, but that's what they said.
Kelton

I remember somewhere several posts about AEEAppGen.o having to be the first module in the link. Is it in one of the libraries, and landed somewhere else?
Seems to me that the order of files being significant is pure voodoo and a sign of something rotten in the state of Denmark, but that's what they said.
Kelton

It has to be the first module?? Bah, lemme try that....
Nope, still get "Unknown Error(4)".
Would excerpts from the makefiles help at all, and if so, which sections / macros?

It has to be the first module?? Bah, lemme try that....
Nope, still get "Unknown Error(4)".
Would excerpts from the makefiles help at all, and if so, which sections / macros?

This is either because you are compiling with the wrong compiler (not arm ;), or because AAEModGen is not the first one in the link process: ie even if you use -firstentry, or whatever the option is, AEEModGen MUST be the first one in the objects list.. ie ld blablalblablalba AEEModGen.o otherobjects..
Good luck!
/kUfa

This is either because you are compiling with the wrong compiler (not arm ;), or because AAEModGen is not the first one in the link process: ie even if you use -firstentry, or whatever the option is, AEEModGen MUST be the first one in the objects list.. ie ld blablalblablalba AEEModGen.o otherobjects..
Good luck!
/kUfa

Thanks, kUfa! Putting AEEModGen in front instead of AEEAppGen did the trick.

Thanks, kUfa! Putting AEEModGen in front instead of AEEAppGen did the trick.

Np!
Btw they should have added it *explicitely* in the documentation, really..
/kUfa

Np!
Btw they should have added it *explicitely* in the documentation, really..
/kUfa

Hello All,
I got the same structure like Bekken got, but with one static libraray(hLib, not an applet) which is a different project solution and my Testapp which is a another proj sln depends on this hLib proj.
my dir structure looks like:
brew_projects dir
|
|
|- hLib dir
| |
| |-vcproj
| |-sln
| |-src dir
| | |-hLib.h(includes all header files of hLIb)
| | |
| | |-games dir
| | | |-.cpp and .h files
| | |
| | |-util dir
| | | |-.cpp and .h files
|
|
|-TestApp
| |
| |-vcproj
| |-sln
| |-.mif
| |-src dir
| | |-.cpp and .h files
| | |-buildme.bat
| |
| |-res dir
| | |-TestApp_res.h
| |
| |-TestApp dir
| | |-TestApp.dll
| | |-TestApp.bar.
Am following according to tyndal's idea in thread
http://brewforums.qualcomm.com/show...=&threadid=1601
which is recommended by one of our friend in the group.
I hav't got a clue how to write a makefile for my TestApp, can some one please tell me how a makefile(gccMakeFile) looks for my TestApp which depends on hLib.. any help is more appreciated.
thanks,
venu.

Hello All,
I got the same structure like Bekken got, but with one static libraray(hLib, not an applet) which is a different project solution and my Testapp which is a another proj sln depends on this hLib proj.
my dir structure looks like:
brew_projects dir
|
|
|- hLib dir
| |
| |-vcproj
| |-sln
| |-src dir
| | |-hLib.h(includes all header files of hLIb)
| | |
| | |-games dir
| | | |-.cpp and .h files
| | |
| | |-util dir
| | | |-.cpp and .h files
|
|
|-TestApp
| |
| |-vcproj
| |-sln
| |-.mif
| |-src dir
| | |-.cpp and .h files
| | |-buildme.bat
| |
| |-res dir
| | |-TestApp_res.h
| |
| |-TestApp dir
| | |-TestApp.dll
| | |-TestApp.bar.
Am following according to tyndal's idea in thread
http://brewforums.qualcomm.com/show...=&threadid=1601
which is recommended by one of our friend in the group.
I hav't got a clue how to write a makefile for my TestApp, can some one please tell me how a makefile(gccMakeFile) looks for my TestApp which depends on hLib.. any help is more appreciated.
thanks,
venu.

hi all,
When i build my library(hLib: which is a static project) looks everything compiles fine, .o files are generated which is good but at the end am getting an error saying:
-----------
GameApp.o(.text+0x28): In function `AEEClsCreateInstance':
: undefined reference to `GetClassId'
GameApp.o(.text+0x74): In function `AEEClsCreateInstance':
: undefined reference to `CreateApp'
make: *** [HailstormLib.elf] Error 1
----------
GetClassId() and CreateApp() are extern functions declared in the parent(GameApp.cpp) class which is in hLib and the code looks like:
-------------------------------------------------------------------------
extern "C"
{
extern CGameApp* CreateApp();
extern unsigned long int GetClassId();
int AEEClsCreateInstance(AEECLSID ClsId, IShell* pIShell, IModule* po, void** ppObj)
{
*ppObj = NULL;
if(ClsId == GetClassId()) //undefined ref err
{
if(AEEApplet_New(sizeof(CFakeApp), ClsId, pIShell, po, (IApplet**)ppObj,(AEEHANDLER)CFakeApp::HandleEvent, ((PFNFREEAPPDATA)CFakeApp::FreeAppData)) == TRUE)
{
CFakeApp* pFakeApp = ((CFakeApp*)*ppObj);
if((pFakeApp->m_pApp = (CGameApp*)CreateApp()) == NULL) //undefined ref err
{
----------------------------------------------------------------------
the two extern functions are implemented in the child class in my app. This code works fine with microsoft compiler but when i compile with gnude then it comes up with those errors. I think
while linking.. the gnude compiler is unable to understand what is GetClassId() and CreateApp(). so i think it is something to do with the makefile, there should be something need to set in the makefile while making .elf...i don't know...
any ideas?. help is appreciated.
thanks,
venu.

hi all,
When i build my library(hLib: which is a static project) looks everything compiles fine, .o files are generated which is good but at the end am getting an error saying:
-----------
GameApp.o(.text+0x28): In function `AEEClsCreateInstance':
: undefined reference to `GetClassId'
GameApp.o(.text+0x74): In function `AEEClsCreateInstance':
: undefined reference to `CreateApp'
make: *** [HailstormLib.elf] Error 1
----------
GetClassId() and CreateApp() are extern functions declared in the parent(GameApp.cpp) class which is in hLib and the code looks like:
-------------------------------------------------------------------------
extern "C"
{
extern CGameApp* CreateApp();
extern unsigned long int GetClassId();
int AEEClsCreateInstance(AEECLSID ClsId, IShell* pIShell, IModule* po, void** ppObj)
{
*ppObj = NULL;
if(ClsId == GetClassId()) //undefined ref err
{
if(AEEApplet_New(sizeof(CFakeApp), ClsId, pIShell, po, (IApplet**)ppObj,(AEEHANDLER)CFakeApp::HandleEvent, ((PFNFREEAPPDATA)CFakeApp::FreeAppData)) == TRUE)
{
CFakeApp* pFakeApp = ((CFakeApp*)*ppObj);
if((pFakeApp->m_pApp = (CGameApp*)CreateApp()) == NULL) //undefined ref err
{
----------------------------------------------------------------------
the two extern functions are implemented in the child class in my app. This code works fine with microsoft compiler but when i compile with gnude then it comes up with those errors. I think
while linking.. the gnude compiler is unable to understand what is GetClassId() and CreateApp(). so i think it is something to do with the makefile, there should be something need to set in the makefile while making .elf...i don't know...
any ideas?. help is appreciated.
thanks,
venu.

Maybe i did not understand properly, but just in case since it may help...
Quote:the two extern functions are implemented in the child class in my app
Well i suppose you mean they are in the .cpp file, not in the class (C functions..)
Did you tried to compile everyfile the buggy file only (using -c) and with all the warning (-wall) ? Same for the microsoft project?
What happens if you do like this:
CGameApp* CreateApp();
unsigned long int GetClassId();
extern "C"
{
int AEEClsCreateInstance(AEECLSID ClsId, IShell* pIShell, IModule* po, void** ppObj)
{
// ...
Regards,
/kUfa

Maybe i did not understand properly, but just in case since it may help...
Quote:the two extern functions are implemented in the child class in my app
Well i suppose you mean they are in the .cpp file, not in the class (C functions..)
Did you tried to compile everyfile the buggy file only (using -c) and with all the warning (-wall) ? Same for the microsoft project?
What happens if you do like this:
CGameApp* CreateApp();
unsigned long int GetClassId();
extern "C"
{
int AEEClsCreateInstance(AEECLSID ClsId, IShell* pIShell, IModule* po, void** ppObj)
{
// ...
Regards,
/kUfa

what is LINK_ORDER in
$(TARGET).$(EXETYPE) : $(APP_OBJS)
$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LDFLAGS) \
$(APP_OBJS) $(LIBS) $(LINK_ORDER)
i can't find LINK_ORDER variable defined in my makefile.
thanks,
venu.

what is LINK_ORDER in
$(TARGET).$(EXETYPE) : $(APP_OBJS)
$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LDFLAGS) \
$(APP_OBJS) $(LIBS) $(LINK_ORDER)
i can't find LINK_ORDER variable defined in my makefile.
thanks,
venu.

Well ... dunno .. but i personnaly set it to -lgcc and it works! :rolleyes:
/kUFa

Well ... dunno .. but i personnaly set it to -lgcc and it works! :rolleyes:
/kUFa

-lgcc is set to LIBS isn't?
thanks,
venu.

-lgcc is set to LIBS isn't?
thanks,
venu.

well, i had troubles when i did not set the -lgcc at the end of my link command... Dunno why..
/kUfa

well, i had troubles when i did not set the -lgcc at the end of my link command... Dunno why..
/kUfa

nope.. i set LINK_ORDER to -lgcc still does't work..
thanks,
venu.

nope.. i set LINK_ORDER to -lgcc still does't work..
thanks,
venu.

Hmm... Btw did you tried what i've mentioned in my prev post?
/kUfa

Hmm... Btw did you tried what i've mentioned in my prev post?
/kUfa

kufa,
yes i did still doesn't work...can you please do me a favour, can you check the values for the below variables for me.
$(TARGET).$(EXETYPE) : $(APP_OBJS)
$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LDFLAGS) \
$(APP_OBJS) $(LIBS) $(LINK_ORDER)
APP_OBJS = AEEModGen.o AEEAppGen.o GCCResolver.o a.o b.o
LD = $(GCCBINPATH)/arm-elf-ld.exe
LINK_CMD = -Ttext 0 --emit-relocs -entry AEEMod_Load -o
LDFLAGS = $(LIBDIRS)
LIBDIRS = -L$(GCCHOMEPATH)/lib/gcc-lib/arm-elf/3.3 -L$(GCCHOMEPATH)/arm-elf/lib
LIBS = -lgcc -lsupc++ -lc
LINK_ORDER = -lgcc
are they ok?
thanks,
venu

kufa,
yes i did still doesn't work...can you please do me a favour, can you check the values for the below variables for me.
$(TARGET).$(EXETYPE) : $(APP_OBJS)
$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LDFLAGS) \
$(APP_OBJS) $(LIBS) $(LINK_ORDER)
APP_OBJS = AEEModGen.o AEEAppGen.o GCCResolver.o a.o b.o
LD = $(GCCBINPATH)/arm-elf-ld.exe
LINK_CMD = -Ttext 0 --emit-relocs -entry AEEMod_Load -o
LDFLAGS = $(LIBDIRS)
LIBDIRS = -L$(GCCHOMEPATH)/lib/gcc-lib/arm-elf/3.3 -L$(GCCHOMEPATH)/arm-elf/lib
LIBS = -lgcc -lsupc++ -lc
LINK_ORDER = -lgcc
are they ok?
thanks,
venu

My config:
(compile)
-DDYNAMIC_APP -O2 -mlittle-endian -fshort-enums -fno-builtin -mcpu=arm7tdmi -mapcs-frame -mthumb-interwork
(link)
LINK_CMD = --no-warn-mismatch -Ttext 0 --emit-relocs -entry AEEMod_Load -LD:\Support\Compile\Brew\Lib
LIBS = -lgcc
One thing, change your APP_OBJS so that the first object it AEEModGen..
But looks ok..
But i think this is a compilation error, nope? And i was talking about the other post, with some code modifs..
/kUfa

My config:
(compile)
-DDYNAMIC_APP -O2 -mlittle-endian -fshort-enums -fno-builtin -mcpu=arm7tdmi -mapcs-frame -mthumb-interwork
(link)
LINK_CMD = --no-warn-mismatch -Ttext 0 --emit-relocs -entry AEEMod_Load -LD:\Support\Compile\Brew\Lib
LIBS = -lgcc
One thing, change your APP_OBJS so that the first object it AEEModGen..
But looks ok..
But i think this is a compilation error, nope? And i was talking about the other post, with some code modifs..
/kUfa

hi,
yep AEEModGen is the first object in my APP_OBJS. The makefile looks fine, everything compiles fine, i cant figure it out whats going on. when i compile am getting this error:
GameApp.o(.text+0x28): In function `AEEClsCreateInstance':
: undefined reference to `GetClassId'
GameApp.o(.text+0x74): In function `AEEClsCreateInstance':
: undefined reference to `CreateApp'
make: *** [HLib.elf] Error 1
any ideas kufa?
thanks,
venu.

hi,
yep AEEModGen is the first object in my APP_OBJS. The makefile looks fine, everything compiles fine, i cant figure it out whats going on. when i compile am getting this error:
GameApp.o(.text+0x28): In function `AEEClsCreateInstance':
: undefined reference to `GetClassId'
GameApp.o(.text+0x74): In function `AEEClsCreateInstance':
: undefined reference to `CreateApp'
make: *** [HLib.elf] Error 1
any ideas kufa?
thanks,
venu.

Well, in the file that uses it (so it's your own AEEAppGen if i'm right), the two functions are not defined..
Add
CGameApp* CreateApp();
unsigned long int GetClassId();
in this file, but not in the extern "C" area..
Then just ensure you have CreateApp and GetClassID defined in one objects... If it doesnt work, use extern "C" for CreateApp and GetClassID:
In your appappgen:
extern "C"
{
CGameApp* CreateApp();
unsigned long int GetClassId();
;
in the file in which you want to use it (note: note in a class!)
extern "C"
{
CGameApp* CreateApp()
{
//...
return myKillinApp;

unsigned long int GetClassId()
{
return myKillinAppID;

;

Well, in the file that uses it (so it's your own AEEAppGen if i'm right), the two functions are not defined..
Add
CGameApp* CreateApp();
unsigned long int GetClassId();
in this file, but not in the extern "C" area..
Then just ensure you have CreateApp and GetClassID defined in one objects... If it doesnt work, use extern "C" for CreateApp and GetClassID:
In your appappgen:
extern "C"
{
CGameApp* CreateApp();
unsigned long int GetClassId();
;
in the file in which you want to use it (note: note in a class!)
extern "C"
{
CGameApp* CreateApp()
{
//...
return myKillinApp;

unsigned long int GetClassId()
{
return myKillinAppID;

;

Sorry folks, deleted b/c my post was substantially the same as kUfa's and I didnt' want to create confusion.

Sorry folks, deleted b/c my post was substantially the same as kUfa's and I didnt' want to create confusion.

Oops, sorry kUfa. Didn't mean to post quite so redundanly at quite so precisely the same time.

Oops, sorry kUfa. Didn't mean to post quite so redundanly at quite so precisely the same time.

hey thanks guys...
yep i gave a try like what you said...i wrapped both the function declaration under one extern "C"..umm...still no luck. I was thinking it something to do with the makefile settings while making .elf.
what do you think..is it something to do with my code?.
thanks,
venu.

hey thanks guys...
yep i gave a try like what you said...i wrapped both the function declaration under one extern "C"..umm...still no luck. I was thinking it something to do with the makefile settings while making .elf.
what do you think..is it something to do with my code?.
thanks,
venu.

Well, if you are sure that you include all the files in the compilation process, yeah this is something wrong with your code..
jhw: hehe no prob :cool:

Well, if you are sure that you include all the files in the compilation process, yeah this is something wrong with your code..
jhw: hehe no prob :cool:

i'll go through the code once again but am pritty much sure the code is perfect..
kufa! should i post the makefile so that it helps you to help me in anyway. And am really appreciate your help...
thanks,
venu.

i'll go through the code once again but am pritty much sure the code is perfect..
kufa! should i post the makefile so that it helps you to help me in anyway. And am really appreciate your help...
thanks,
venu.

Well, an empty project would help much more, or at least some almost empty code sample, because i doubt it is a link error due to wrong parameters. I think it's some strange behaviour due to label names... (dunno if i'm really clear :)
Well, i please do not send all your code, just c&p some part to have a non-compiling proggy..
/kUfa

Well, an empty project would help much more, or at least some almost empty code sample, because i doubt it is a link error due to wrong parameters. I think it's some strange behaviour due to label names... (dunno if i'm really clear :)
Well, i please do not send all your code, just c&p some part to have a non-compiling proggy..
/kUfa

OK, I'll jump in now.
Try taking the CreateApp() and GetClassID() *out* of the extern "C" block, both where you declare it in the code you have shown it (right before AEEClsCreateInstance()) and where it is defined in the other file.
In any case, if you're using C++ AEEClsCreateInstance() is the only function you write that requires extern "C" linkage and name mangling. Of course, AEEModGen.c, AEEAppGen.c, and GCCResolver.c also need C linkage; make sure you compile them with gcc (which recognizes .c vs .cpp) and not g++ (which assumes everything needs C++ linkage).
Another idea: in the definition file, make sure you haven't marked CreateApp() and GetClassID() "static". There's a tricky C++ difference between:
class Foo {
static void bar ();
;
and:
static void baz ();
For a class member function, static just means "independent of any object", but for a global-scope function or variable, static means "only link-visible in the current compilation unit". In other words, in C static is used to *prevent* objects from being linked to from the outside.
I'm using a trick similar to yours for my own project, so it can be done.
-Jesse

OK, I'll jump in now.
Try taking the CreateApp() and GetClassID() *out* of the extern "C" block, both where you declare it in the code you have shown it (right before AEEClsCreateInstance()) and where it is defined in the other file.
In any case, if you're using C++ AEEClsCreateInstance() is the only function you write that requires extern "C" linkage and name mangling. Of course, AEEModGen.c, AEEAppGen.c, and GCCResolver.c also need C linkage; make sure you compile them with gcc (which recognizes .c vs .cpp) and not g++ (which assumes everything needs C++ linkage).
Another idea: in the definition file, make sure you haven't marked CreateApp() and GetClassID() "static". There's a tricky C++ difference between:
class Foo {
static void bar ();
;
and:
static void baz ();
For a class member function, static just means "independent of any object", but for a global-scope function or variable, static means "only link-visible in the current compilation unit". In other words, in C static is used to *prevent* objects from being linked to from the outside.
I'm using a trick similar to yours for my own project, so it can be done.
-Jesse

thats brilliant thanks for your help kufa...please find the makefile and GameApp.cpp in the attachements. I feel there could be something am missing in the makefile while linking...
thanks,
venu.

thats brilliant thanks for your help kufa...please find the makefile and GameApp.cpp in the attachements. I feel there could be something am missing in the makefile while linking...
thanks,
venu.

hello jesse,
i tried using gcc too but still it comes up with same error, the point is.. the code compiles fine the problem comes while linking, i think am missing something in the makefile...i posted the makefile if you dont mind can you please have a look at it. I really appreciate your help.
thanks,
venu.

hello jesse,
i tried using gcc too but still it comes up with same error, the point is.. the code compiles fine the problem comes while linking, i think am missing something in the makefile...i posted the makefile if you dont mind can you please have a look at it. I really appreciate your help.
thanks,
venu.

Well, for starters I tested kUfa's suggestions (just in case) and they compile OK for me.
The .zip package you posted did not include a stub definition of GetClassID() or CreateApp() so I can't check that they are defined properly.
Are you still getting the same error about undefined references to GetClassID and CreateApp?
My link command for GCC (from a Gnu make Makefile, not nmake) looks like this:
LINK = $(GNUARM_HOME)/bin/arm-elf-ld
ELF2MOD = $(BREWELF2MOD_HOME)/BREWelf2mod
LFLAGS = -nodefaultlibs -nostdlib \
-Ttext 0 --emit-relocs -entry=AEEMod_Load
LFLAGS_POST = -L$(GNUARM_HOME)/lib/gcc-lib/arm-elf/2.95.3 -lgcc
$(OBJDIR)/$(PROJ).$(EXE): $(OBJECTS:%=$(OBJDIR)/%)
@echo linking $@
@mkdir -p $(OBJDIR)
@$(LINK) $(LFLAGS) -o $@ $^ $(LFLAGS_POST)
The only substantial difference with yours is that all my -L and -l flags come *after* the list of object files.
One unrelated warning. You probably don't want to use -mthumb, since BREWelf2mod.exe doesn't support thumb-mode instruction set. Even when BREWelf2mod.exe does support thumb-mode (or if you use ARM's armcc, tcc), you must be sure not to use thumb-mode for AEEModGen.o. I see the flag hidding in the Makefile, but it isn't used yet so you're OK on that one.
-Jesse

Well, for starters I tested kUfa's suggestions (just in case) and they compile OK for me.
The .zip package you posted did not include a stub definition of GetClassID() or CreateApp() so I can't check that they are defined properly.
Are you still getting the same error about undefined references to GetClassID and CreateApp?
My link command for GCC (from a Gnu make Makefile, not nmake) looks like this:
LINK = $(GNUARM_HOME)/bin/arm-elf-ld
ELF2MOD = $(BREWELF2MOD_HOME)/BREWelf2mod
LFLAGS = -nodefaultlibs -nostdlib \
-Ttext 0 --emit-relocs -entry=AEEMod_Load
LFLAGS_POST = -L$(GNUARM_HOME)/lib/gcc-lib/arm-elf/2.95.3 -lgcc
$(OBJDIR)/$(PROJ).$(EXE): $(OBJECTS:%=$(OBJDIR)/%)
@echo linking $@
@mkdir -p $(OBJDIR)
@$(LINK) $(LFLAGS) -o $@ $^ $(LFLAGS_POST)
The only substantial difference with yours is that all my -L and -l flags come *after* the list of object files.
One unrelated warning. You probably don't want to use -mthumb, since BREWelf2mod.exe doesn't support thumb-mode instruction set. Even when BREWelf2mod.exe does support thumb-mode (or if you use ARM's armcc, tcc), you must be sure not to use thumb-mode for AEEModGen.o. I see the flag hidding in the Makefile, but it isn't used yet so you're OK on that one.
-Jesse

umm..i hav't got any luck yet, still messing up with that error. I finished the game a week ago and am very eager to get hands on it...can't understand where am going wrong, it would be great if some one post their makefile(for c++ app).
thanks,
venu.

umm..i hav't got any luck yet, still messing up with that error. I finished the game a week ago and am very eager to get hands on it...can't understand where am going wrong, it would be great if some one post their makefile(for c++ app).
thanks,
venu.

Well, sorry to say that, but the *ONLY* trouble with makefile you can have atm would be that some files are missing in the link commandline..
Btw try to make a very very small programm, and send it to us if you want.. But a complete one, that gives the error..
But also try to be careful, i've seen you are using namespaces..

Well, sorry to say that, but the *ONLY* trouble with makefile you can have atm would be that some files are missing in the link commandline..
Btw try to make a very very small programm, and send it to us if you want.. But a complete one, that gives the error..
But also try to be careful, i've seen you are using namespaces..