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.

Coding > Issues using the Visual C++ IDE

#1243 - Sweex - Wed Jan 15, 2003 10:26 pm

I'm using (as probably many of you) the Visual C++ IDE for developing my GBA stuff. I've got a workspace with two projects in it. One's the source of my library, and the second is my (test) project itself.

This is working fine for most of the time, but the following occurs. If I make changes only to the library project (which I do a lot as I'm mainly coding the library at this point), the testproject will not relink! So to test any change, I have to make a change to a file in the testproject (ie. adding and deleting a space) to get it to build and link properly.

Does anyone have any idea how I can get it to detect changes to the library project? (Dependencies are defined)

Thanks in advance!

#1279 - Quirky - Thu Jan 16, 2003 9:05 am

I don't use VC++, just hand coded makefiles... But can't you put in your makefile something like this?:

main.o : main.c main.h mygbalib.lib
gcc -c $<

Then whenever the lib file changes, your makefile will see that your main.o needs recompiling. Oh hang on that's not your question... but it might be useful.

You need to tell the makefile which files your .elf, from which the final .bin is made, depends on. Something like:

main.elf: main.o mygbalib.lib
gcc $(LDFLAGS) -o etc, etc...

The same thing here, the lib changes, it relinks main.elf ( and in turn makes a new main.bin ) Just tried that and it works a treat. In fact, my makefile had the same problem - if I would have changed my libs only, my main binary wouldn't have changed either!

#1285 - Sweex - Thu Jan 16, 2003 10:50 am

I'm using a handcoded makefile too (Couldn't get some cool use of the DSP working!:-( )...

The line you gave me seems just the thing I need... Will try it later today!:)

Cheers!