Dumb Problem Using Visual Studio With Devkitpro.


HexDump

Still Fresh
Joined
Nov 15, 2004
Messages
30
Hi,

I have downloaded and intalled devkitpro. I´m using visual studio 8 as my ide. I have followed the doc at wiki to use vc8 with devkitpro, but I ran into a dumb problme I don´t know how to fix:

I get an Error 255 from command line when I compile. I have checked the log file and this is what I found:

Creating temporary file "c:\Projects\game\GP2X\Debug\BAT00000D33843520.bat" with contents
[
@echo off

arm-linux-gcc.exe -c -o Debug\main.o .\main.cpp 2>&1 | sed -e s/(.[a-zA-Z]\+):([0-9]\+):/\1(\2):/

if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from "main.cpp"

exit 1

:VCEnd
]
Creating command line "c:\Projects\Game\GP2X\Debug\BAT00000D33843520.bat"

The weird thing you may notice is that it creates the bat to compile in "c:\Projects\game\GP2X\Debug\BAT00000D33843520.bat", instead of "c:\Projects\game\GP2X\BAT00000D33843520.bat", because it compiles the file into Debug\main.o and uses .\main.o to create the object file.

I have copied the bat file into "c:\Projects\game\GP2X" and ran it and everything worked ok.

Is there anyone that could tell me why vc 8 is creating the bat file in the wrong place? :/.

Thanks in advance,
HexDump.
 
Last edited by a moderator:
The bat file is in the right place. Mine runs just fine (i.e. this works):
Creating command line "r:\Projects\xxx\Code\Specific\GP2X\Debug\BAT00000726122084.bat"
Creating temporary file "r:\Projects\xxx\Code\Specific\GP2X\Debug\BAT00000826122084.bat" with contents
[
@echo off

arm-linux-gcc.exe -c -I"R:\Projects\xxx\Code\Specific\GP2X\..\..\External\Linux\include" -save-temps -o Debug\GP2X.o .\GP2X.cpp 2>&1 | sed -e 's/(.[a-zA-Z]\+):([0-9]\+):/\1(\2):/'

if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from "GP2X.cpp"

exit 1

:VCEnd

What's your CustomBuildRule for gcc in the build rules file? Mine is:
<CustomBuildRule
Name="arm-linux-gcc"
DisplayName="GCC Compiler"
CommandLine="arm-linux-gcc.exe -c [AllOptions] [AdditionalOptions] -o $(IntDir)\$(InputName).o [inputs] 2>&1 | sed -e 's/(.[a-zA-Z]\+):([0-9]\+):/\1(\2):/'"
Outputs="$(IntDir)\$(InputName).o"
FileExtensions="*.c;*.cpp"
ExecutionDescription="$(InputFileName)"
>
(I modified mine a bit from the wiki 'cos my version of sed was barfing if it didn't have quotes around it.
 
Last edited by a moderator:
Ok mate, it was my problem, I think I missed something. I did it again and everything when ok.

Just another question, I have written a little program and linker complains about new/delete not been defined, I thought this was built in when compiling c++ :confused:.

I´m using gcc (as the tutorial states) to compile and arm-linux-link in order to link.

Edit: I have read that 'libstdc++.a' must be linked with the project to avoid the linking problems. Now when I try to compile everything I get a ld error saying that can´t find -llibstdc++.a :confused:.

Thanks in advance,
HexDump.
 
HexDump posted on Jul 10 2006 at 03:02 PM said:
Edit: I have read that 'libstdc++.a' must be linked with the project to avoid the linking problems. Now when I try to compile everything I get a ld error saying that can´t find -llibstdc++.a :confused:.
You need to tell it where to find it. Set your Additional Library Paths (LibPaths) in the GCC Linker section accordingly.
 
Last edited by a moderator:
Back
Top