xboxscene.org forums

Author Topic: Openxdk Help  (Read 144 times)

ColdReader

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Openxdk Help
« on: August 05, 2005, 11:32:00 AM »

i dont understand how to install it correctly with dev-cpp and i wont ever emulate linux

so heres what i got  i have openxdk installed in my cygwin usr/local and all the directories are right and linker commands and all but it just wont compile i dont get how to edit makefiles or all that mess  i've been studying C++ and have the xdk but would rather use open xdk

everything i do it just wont compile for the simple reason that in the bin folder the gcc and the g++ arent .exe extention so i cant compile anyways arghhh someone help

heres some errors i get trying to compile the reboot.xbe

2 C:\openxdk\openxdk\samples\reboot.c                  from reboot.c

2 C:\cygwin\usr\local\openxdk\include\xboxkrnl\xboxkrnl.h:15,               from reboot.c In file included from C:/cygwin/usr/local/openxdk/include/xboxkrnl/xboxkrnl.h:15,               from reboot.c

This post has been edited by ColdReader: Aug 5 2005, 06:43 PM
Logged

d0wnlab

  • Archived User
  • Sr. Member
  • *
  • Posts: 326
Openxdk Help
« Reply #1 on: August 05, 2005, 12:47:00 PM »

Can you post the whole error output?  What you posted doesn't really help any..
Logged

ColdReader

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Openxdk Help
« Reply #2 on: August 05, 2005, 01:03:00 PM »

that is the whole error output and besides the gcc and g++ dont have the .exe extention in the .bin folder so i cant compile right
Logged

ColdReader

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Openxdk Help
« Reply #3 on: August 05, 2005, 02:36:00 PM »

C:\openxdk\openxdk\samples\Makefile.win [Build Error]  [tut.exe] Error 1
 C:\openxdk\openxdk\samples\Untitled1.o In function `XBoxStartup':
  [Linker error] undefined reference to `XSleep'
  [Linker error] undefined reference to `XReboot'
  [Linker error] undefined reference to `XVideoSetMode'

and so on i get that but no other errors
Logged

d0wnlab

  • Archived User
  • Sr. Member
  • *
  • Posts: 326
Openxdk Help
« Reply #4 on: August 05, 2005, 02:44:00 PM »

could you post your makefile
Logged

ColdReader

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Openxdk Help
« Reply #5 on: August 05, 2005, 02:50:00 PM »

yeah i guess i hate makefiles

# Project: tut
# Makefile created by Dev-C++ 4.9.9.2

CPP  = g++.exe
CC   = gcc.exe
WINDRES = windres.exe
RES  =
OBJ  = padTest.o $(RES)
LINKOBJ  = padTest.o $(RES)
LIBS =  -L"C:/Dev-Cpp/lib" -L"C:/cygwin/usr/local/openxdk/lib" -L"C:/cygwin/usr/local/openxdk/i386-pc-xbox/lib" -L"C:/cygwin/usr/local/openxdk/lib" -L"C:/cygwin/usr/local/openxdk/i386-pc-xbox/lib" -mwindows -nostdlib -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20 -shared -Wl,--entry,_WinMainCRTStartup -Wl,--strip-all -lstdc++ -lSDL -lopenxdk -lhal -lc -lhal -lusb -lc -lxboxkrnl  
INCS =  -I"C:/Dev-Cpp/include"  -I"C:/cygwin/usr/local/openxdk/include"  -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include"  -I"C:/cygwin/usr/local/openxdk/include/include"  -I"C:/cygwin/usr/local/openxdk/include"  -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include"
CXXINCS =  -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"  -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include"  -I"C:/cygwin/usr/local/openxdk/include"  -I"C:/cygwin/usr/local/openxdk/include/SDL"  -I"C:/cygwin/usr/local/openxdk/include/include"  -I"C:/cygwin/usr/local/openxdk/include"  -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include"
BIN  = tut.exe
CXXFLAGS = $(CXXINCS) -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM   -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM
CFLAGS = $(INCS) -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM   -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM
RM = rm -f

.PHONY: all all-before all-after clean clean-custom

all: all-before tut.exe all-after


clean: clean-custom
   ${RM} $(OBJ) $(BIN)

$(BIN): $(OBJ)
   $(CPP) $(LINKOBJ) -o "tut.exe" $(LIBS)

padTest.o: padTest.c
   $(CPP) -c padTest.c -o padTest.o $(CXXFLAGS)


This post has been edited by ColdReader: Aug 5 2005, 09:51 PM
Logged

darkstalker

  • Archived User
  • Jr. Member
  • *
  • Posts: 74
Openxdk Help
« Reply #6 on: August 05, 2005, 07:37:00 PM »

QUOTE(ColdReader @ Aug 5 2005, 06:01 PM)

CPP  = g++.exe
CC   = gcc.exe
WINDRES = windres.exe


Have you tried removing the .exe at the end of those?

You said you won't ever emulate Linux.. but you're using cygwin... heh. Executables don't have a .exe in unix environments.
Logged

ColdReader

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Openxdk Help
« Reply #7 on: August 05, 2005, 09:44:00 PM »

im not using unix im using dev CPP
Logged

ColdReader

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Openxdk Help
« Reply #8 on: August 06, 2005, 07:10:00 AM »

bump please
Logged

ColdReader

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Openxdk Help
« Reply #9 on: August 06, 2005, 08:07:00 AM »

ok nevermind the above i started over by using kennelbounds tut again and i only have one error now


 C:\openxdk\openxdk\samples\Makefile.win [Build Error]  [comingSoon.o] Error 1

heres the make file


# Project: Project1
# Makefile created by Dev-C++ 4.9.9.2

CPP  = i386-pc-xbox-g++
CC   = i386-pc-xbox-gcc
WINDRES = i386-pc-xbox-windres
RES  =
OBJ  = comingSoon.o $(RES)
LINKOBJ  = comingSoon.o $(RES)
LIBS =  -L"C:/cygwin/usr/local/openxdk/lib" -L"C:/cygwin/usr/local/openxdk/i386-pc-xbox/lib" -nostdlib -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20 -shared -Wl,--entry,_WinMainCRTStartup -Wl,--strip-all -lstdc++ -lSDL -lopenxdk -lhal -lc -lhal -lusb -lc -lxboxkrnl -L"C:/cygwin/usr/local/openxdk/lib" -L"C:/cygwin/usr/local/openxdk/i386-pc-xbox/lib" -mwindows -nostdlib -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20 -shared -Wl,--entry,_WinMainCRTStartup -Wl,--strip-all -lstdc++ -lSDL -lopenxdk -lhal -lc -lhal -lusb -lc -lxboxkrnl  
INCS =  -I"C:/cygwin/usr/local/openxdk/include"  -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include"  -I"C:/cygwin/usr/local/openxdk/include/include"  -I"C:/cygwin/usr/local/openxdk/include/SDL"  -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include"  -I"C:/cygwin/usr/local/openxdk/include"
CXXINCS =  -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include"  -I"C:/cygwin/usr/local/openxdk/include"  -I"C:/cygwin/usr/local/openxdk/include/SDL"  -I"C:/cygwin/usr/local/openxdk/include/include"  -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include"  -I"C:/cygwin/usr/local/openxdk/include"
BIN  = Project1.exe
CXXFLAGS = $(CXXINCS) -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM   -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM
CFLAGS = $(INCS) -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM   -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM
RM = rm -f

.PHONY: all all-before all-after clean clean-custom

all: all-before Project1.exe all-after


clean: clean-custom
   ${RM} $(OBJ) $(BIN)

$(BIN): $(OBJ)
   $(CPP) $(LINKOBJ) -o "Project1.exe" $(LIBS)

comingSoon.o: comingSoon.c
   $(CPP) -c comingSoon.c -o comingSoon.o $(CXXFLAGS)



here's the source


extern "C" {
#include "comingSoon.h"
#include <hal/xbox.h>
#include <hal/video.h>
#include <xboxkrnl/xboxkrnl.h>
}

extern "C" void XBoxStartup(){
{
   int *frame_buffer = (int*)XVideoGetFB();
   
   // ******************************************************************
   // * clear to black
   // ******************************************************************
   {
      for(int c=0;c<640*480;c++)
         frame_buffer[c] = 255;
   }
   
   // ******************************************************************
   // * render coming_soon image, centered
   // ******************************************************************
   {
      for(int y=220, r=0;y<260;y++)
      {
         for(int x=160;x<480;x++,r++)
         {
            int v = y*640+x;
            frame_buffer[v] = coming_soon[r] | (coming_soon[r] << 8) | (coming_soon[r] << 16) | (0xFF << 24);
         }
      }
   }
   XSleep(5000);
   XReboot();
}


downlab edaward err someone tell me whats wrong??

This post has been edited by ColdReader: Aug 6 2005, 03:09 PM
Logged

d0wnlab

  • Archived User
  • Sr. Member
  • *
  • Posts: 326
Openxdk Help
« Reply #10 on: August 06, 2005, 10:05:00 AM »

this error does not help me whatsoever:
QUOTE

C:\openxdk\openxdk\samples\Makefile.win [Build Error] [comingSoon.o] Error 1


You need to post the whole error dump when compiling for it to be of any use.
Logged

ColdReader

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Openxdk Help
« Reply #11 on: August 06, 2005, 05:04:00 PM »

i posted my make file for you and thats the ONLY error i get when trying to compile
Logged

kennelbound

  • Archived User
  • Newbie
  • *
  • Posts: 39
Openxdk Help
« Reply #12 on: August 06, 2005, 08:06:00 PM »

In Dev-C++ after the build failure, click on the Compile Log tab at the bottom.  Copy and paste everything thats in there.  That will contain all of the errors.
Logged

ColdReader

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Openxdk Help
« Reply #13 on: August 06, 2005, 09:18:00 PM »

Compiler: Xbox
Building Makefile: "C:\openxdk\openxdk\samples\Makefile.win"
Executing  make clean
rm -f launchXBE.o  Project1.exe

i386-pc-xbox-g++ -c launchXBE.c -o launchXBE.o -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include"  -I"C:/cygwin/usr/local/openxdk/include"  -I"C:/cygwin/usr/local/openxdk/include/SDL"  -I"C:/cygwin/usr/local/openxdk/include/include"     -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM

'i386-pc-xbox-g++' is not recognized as an internal or external command,
operable program or batch file.

make.exe: *** [launchXBE.o] Error 1

Execution terminated


UPDATE****

i changed the g++ and gcc exe with the ones in the bin dir in cywin dir and now i get this

Compiler: Xbox
Building Makefile: "C:\openxdk\openxdk\samples\Makefile.win"
Executing  make clean
rm -f launchXBE.o  Project1.exe

g++.exe -c launchXBE.c -o launchXBE.o -I"C:/cygwin/usr/local/openxdk/i386-pc-xbox/include"  -I"C:/cygwin/usr/local/openxdk/include"  -I"C:/cygwin/usr/local/openxdk/include/SDL"  -I"C:/cygwin/usr/local/openxdk/include/include"     -c -g -std=gnu99 -ffreestanding -nostdlib -fno-builtin -fno-exceptions -mno-cygwin -march=i386 -DENABLE_XBOX -DDISABLE_CDROM

cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-ffreestanding" is valid for C/ObjC but not for C++

In file included from C:/cygwin/usr/local/openxdk/include/xboxkrnl/xboxkrnl.h:15,
                 from launchXBE.c:5:
C:/cygwin/usr/local/openxdk/include/xboxkrnl/types.h:26: error: redeclaration of C++ built-in type `bool'

make.exe: *** [launchXBE.o] Error 1

Execution terminated


This post has been edited by ColdReader: Aug 7 2005, 04:23 AM
Logged

ColdReader

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Openxdk Help
« Reply #14 on: August 06, 2005, 09:28:00 PM »

UPDATE!!!!!

i just deleted the old makefile and now it compiles fine with two warning but im trying to figure out how to work cxbe
Logged