#151960 - NAveryW - Fri Mar 07, 2008 1:41 am
-I've followed absolutely all of the instructions on http://www.palib.info/wiki/doku.php?id=day1 exactly.
-When I run the build.bat file in the HelloWorld example folder, it compiles perfectly.
-I'm using Windows Vista and Visual C++ 2008 and have done all the necessary modifications mentioned on that wiki page, such as adding the new line of code in the "Build Command Line" section.
However, when I try to build the default Hello World solution (I named the project "Blargh"), I get the following output:
Quote: |
1>------ Build started: Project: Blargh, Configuration: Release Win32 ------
1>Performing Makefile project actions
1>main.cpp
1>c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h: In function 'u16 PA_GetBmpWidth(void*)':
1>c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h(689): error: pointer of type 'void *' used in arithmetic
1>c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h: In function 'u16 PA_GetBmpHeight(void*)':
1>c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h(704): error: pointer of type 'void *' used in arithmetic
1>make[1]: *** [main.o] Error 1
1>make: *** [build] Error 2
1>Build log was saved at "file://c:\Projetos\VisualCPP\Blargh\Blargh\Release\BuildLog.htm"
1>Blargh - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
Can anyone help me fix this or point me to another compiler that will work with PAlib without too much setup?
#151961 - nczempin - Fri Mar 07, 2008 2:00 am
NAveryW wrote: |
-I've followed absolutely all of the instructions on http://www.palib.info/wiki/doku.php?id=day1 exactly.
-When I run the build.bat file in the HelloWorld example folder, it compiles perfectly.
-I'm using Windows Vista and Visual C++ 2008 and have done all the necessary modifications mentioned on that wiki page, such as adding the new line of code in the "Build Command Line" section.
However, when I try to build the default Hello World solution (I named the project "Blargh"), I get the following output:
Quote: | 1>------ Build started: Project: Blargh, Configuration: Release Win32 ------
1>Performing Makefile project actions
1>main.cpp
1>c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h: In function 'u16 PA_GetBmpWidth(void*)':
1>c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h(689): error: pointer of type 'void *' used in arithmetic
1>c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h: In function 'u16 PA_GetBmpHeight(void*)':
1>c:/devkitPro/PAlib//include/nds/arm9/PA_Draw.h(704): error: pointer of type 'void *' used in arithmetic
1>make[1]: *** [main.o] Error 1
1>make: *** [build] Error 2
1>Build log was saved at "file://c:\Projetos\VisualCPP\Blargh\Blargh\Release\BuildLog.htm"
1>Blargh - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
Can anyone help me fix this or point me to another compiler that will work with PAlib without too much setup? |
Try starting off with Programmer's notepad that comes with devkitPro.
You're not meant to use the Visual Studio compiler; I doubt it cross-compiles to ARM, and your project configuration "Release Win32" doesn't sound promising for DS building.
Actually, go even one step further back, and just run Mingw, change to your project directory and type "make".
Once you can get it building from the mingw shell, you can try getting it to run under the VS IDE. You'll mainly use the nice IDE features, not the Windows compiler(s).
Anyone with more experience on the DS and perhaps even in combination with VS, correct me if I'm wrong ;-)
#151962 - NAveryW - Fri Mar 07, 2008 2:25 am
I'd prefer to not have to compile using a command line application if possible. >_>;
I was never able to figure out how to compile using Programmer's Notepad. It seems like it would be incredibly simple, but it didn't pop out at me, and I can't find it in the documentation. Would you be able to help me there?
#151970 - nczempin - Fri Mar 07, 2008 11:35 am
NAveryW wrote: |
I'd prefer to not have to compile using a command line application if possible. >_>; |
So you'd prefer not to be able to compile at all??
I didn't say you'd have to stick with that method, but it is an important sanity check. Because if it doesn't compile on the command line, it won't compile anywhere.
And any kind of other compiling in the DS homebrew context is just command-line calls hidden behind GUIs. Visual Studio won't give you a different compiler, just a different editor.
Quote: |
I was never able to figure out how to compile using Programmer's Notepad. It seems like it would be incredibly simple, but it didn't pop out at me, and I can't find it in the documentation. Would you be able to help me there? |
well, collect the info you need to be able to run the "make" command from MinGW, then the next step would be to call the make command from your IDE; with PN being a little bit simpler to set up than VS.
I'm afraid you're going to have to bite the bullet, we are talking about embedded development here, you should be glad that you even have a compiler! ;-)
#151972 - ThomasS - Fri Mar 07, 2008 1:10 pm
The error you're getting is due to a bug which unfortunately happens with the latest PAlib version when using C++ in your project. Do a search in the PAlib forums, the solution has been posted multiple times.
It' works well to use Visual Studio as IDE, I also do it. Your configurations seems ok.
We didn't release a new, "stable" PAlib version yet because the mp3 problems on the G6 (and only on the G6!!!) are still there.
_________________
<dsFont> <Game Collection>
#151975 - nczempin - Fri Mar 07, 2008 2:04 pm
ThomasS wrote: |
The error you're getting is due to a bug which unfortunately happens with the latest PAlib version when using C++ in your project. Do a search in the PAlib forums, the solution has been posted multiple times.
It' works well to use Visual Studio as IDE, I also do it. Your configurations seems ok.
We didn't release a new, "stable" PAlib version yet because the mp3 problems on the G6 (and only on the G6!!!) are still there. |
That makes it easier, of course ;-)
I still stand by my view that one should at least know how the command-line stuff works before trying to hide it all behind an IDE.
#152016 - Corsix - Sat Mar 08, 2008 11:42 am
All the IDE does in this case is execute "make" in the project folder when you press the build button, displaying the output in the build window.
The command line isn't very different; you open a command prompt in the project folder, type "make" and see the output.
#152027 - wintermute - Sat Mar 08, 2008 3:26 pm
ThomasS wrote: |
We didn't release a new, "stable" PAlib version yet because the mp3 problems on the G6 (and only on the G6!!!) are still there. |
Are you a PAlib maintainer?
Perhaps you might consider not breaking devkitARM in your installer. Currently I'm very tempted to have the devkitPro updater detect PAlib and report it's trojan behaviour to the user, recommending that it be removed from the system.
PAlib should not under any circumstances be modifying the official library distributions provided by devkitPro.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#152033 - ThomasS - Sat Mar 08, 2008 6:37 pm
Yes, I'm one of those who extended the latest "official" version. Our new beta wasn't released with an installer yet (only in archive form), so the version you're referring to is the old version which was still solely developed by Mollusk. When we release a new installer, we certainly won't include any DevkitARM files anymore.
_________________
<dsFont> <Game Collection>
#152050 - NAveryW - Sun Mar 09, 2008 12:19 am
Never mind; I was able to get it to compile using the build.bat thing that is included with all of the examples.