#116732 - nolentabner - Sun Jan 28, 2007 11:35 pm
I apologize for the "noob"ness of this post, but I'm still new to libnds and I can't figure out why this won't compile.
This is the very first part of the tutorial, after you add the starfield and splash images to the code.
Here is the error message:
And here is my code for those two lines:
I've typed all this code out exactly as the tutorial shows, and I've even tried just copying the text directly into the editor. Why does it think that it's being converted from int to void? This is exactly what the tutorial shows for me to type in.
This is the very first part of the tutorial, after you add the starfield and splash images to the code.
Here is the error message:
Code: |
c:/devkitPro/mystuff/spaceShip/source/main.cpp: In function 'void displaySplash()': c:/devkitPro/mystuff/spaceShip/source/main.cpp:61: error: invalid conversion from 'int' to 'void*' c:/devkitPro/mystuff/spaceShip/source/main.cpp:61: error: initializing argument 2 of 'void dmaCopy(const void*, void*, uint32)' c:/devkitPro/mystuff/spaceShip/source/main.cpp: In function 'void displayStarField()': c:/devkitPro/mystuff/spaceShip/source/main.cpp:67: error: invalid conversion from 'int' to 'void*' c:/devkitPro/mystuff/spaceShip/source/main.cpp:67: error: initializing argument 2 of 'void dmaCopy(const void*, void*, uint32)' make[1]: *** [main.o] Error 1 "make": *** [build] Error 2 > Process Exit Code: 2 > Time Taken: 00:03 |
And here is my code for those two lines:
Code: |
void displaySplash() { dmaCopy(Splash_bin, BG_BMP_RAM_SUB(0), Splash_bin_size); //sub bg is BG_BMP_RAM_SUB(0) } void displayStarField() { dmaCopy(StarField_bin, BG_BMP_RAM(0), StarField_bin_size); // main bg is BG_BMP_RAM(0) } |
I've typed all this code out exactly as the tutorial shows, and I've even tried just copying the text directly into the editor. Why does it think that it's being converted from int to void? This is exactly what the tutorial shows for me to type in.