Setting up Dev-C++ with PSPSDK
[Linker error] undefined reference to `sceKernelCreateThread'
[Linker error] undefined reference to `sceKernelStartThread'
[Linker error] undefined reference to `main'
y:\drive\c\Program Files\PSPDev\psp\lib\crt0.o In function `__entrytable':
[Linker error] undefined reference to `module_info'
y:\drive\c\Program Files\PSPDev\psp\lib\crt0.o ld returned 1 exit status
C:\Dev-Cpp\Makefile.win [Build Error] [Project2.exe] Error 1
i keep getting the same errors when i try to compile sources of already made psp hombrew.Could any one help?
[Linker error] undefined reference to `sceKernelStartThread'
[Linker error] undefined reference to `main'
y:\drive\c\Program Files\PSPDev\psp\lib\crt0.o In function `__entrytable':
[Linker error] undefined reference to `module_info'
y:\drive\c\Program Files\PSPDev\psp\lib\crt0.o ld returned 1 exit status
C:\Dev-Cpp\Makefile.win [Build Error] [Project2.exe] Error 1
i keep getting the same errors when i try to compile sources of already made psp hombrew.Could any one help?
Please read the common errors and solutions page, it has your answer.Twenty 2 wrote:[Linker error] undefined reference to `sceKernelCreateThread'
[Linker error] undefined reference to `sceKernelStartThread'
[Linker error] undefined reference to `main'
y:\drive\c\Program Files\PSPDev\psp\lib\crt0.o In function `__entrytable':
[Linker error] undefined reference to `module_info'
y:\drive\c\Program Files\PSPDev\psp\lib\crt0.o ld returned 1 exit status
C:\Dev-Cpp\Makefile.win [Build Error] [Project2.exe] Error 1
i keep getting the same errors when i try to compile sources of already made psp hombrew.Could any one help?
Lego of my Ago!
Please, use the search function. It is your friend. Just because you are new to developing applications on the PSP doesn't mean that you have the right to not do any work yourself.
Here, I did your work for you and linked the thread. Read THIS thread.
Here, I did your work for you and linked the thread. Read THIS thread.
Lego of my Ago!
If you look at your code, you will see that you have:
Does that not look similar to:Twenty 2 wrote: y:\drive\c\Program Files\PSPDev\psp\lib\crt0.o In function `__entrytable':
[Linker error] undefined reference to `module_info'
y:\drive\c\Program Files\PSPDev\psp\lib\crt0.o ld returned 1 exit status
C:\Dev-Cpp\Makefile.win [Build Error] [Project2.exe] Error 1
Common errors and Solutions wrote:Q: In function `__entrytable':
crt0.S:(.rodata.sceResident+0xc): undefined reference to `module_info'
A:Make sure that you have PSP_MODULE_INFO("SOMETHING", 0, 1, 1); somewhere in your program.
Lego of my Ago!
I got the same error ,please helpsicksand wrote:i have no problem in setup the environment in dev cpp. but i have encountered error when compiling it. the output of error are.
details :Code: Select all
C:\Dev-Cpp\project\Makefile [Build Error] No rule to make target `main.o', needed by `project.elf'. Stop.
my project.dev file is in Dev-Cpp folder, my project file, main.c and Makefile are in a directory named testpower
thanks.[/code]Code: Select all
-Dev-Cpp |_ project1.dev |_ testpower |_ main.c |_ Makefile |_devcpp.exe
BTW,in console mode ,there was no error
The win32 package is outdated, and I have udpated the page to point to the programming FAQ wiki page.XRS wrote:So i just need this to begin programming with c++ to PSP??
I have read some tutos that talk in install cygwin, psptoochain...
I am a little confused...
After you read the wiki, then follow the rest of the directions in order to set it up.
Lego of my Ago!
Hi all,
I've just downloaded the libpng and the zlib from the svn repository.
They compiled fine with Dev-C++, creating the libpng.a and zlib.a librairies. I've installed them into the $(PSPSDK)/lib dir.
Now I'd like to compile a piece of code taken from Shine's graphics.c file (from the LuaPlayer source), just to see if I can display a PNG picture on my PSP.
Compilation is okay, but I keep having the following linker errors :
Is libpng recompiled each time ?
I tryed to search these forums, badly I guess, because I can't find an answer :/
By the way, here is my Makefile (I use a custom one from the SDK, not the one generated by Dev-C++) :
Any help would be greatly appreciated, thanks !
I've just downloaded the libpng and the zlib from the svn repository.
They compiled fine with Dev-C++, creating the libpng.a and zlib.a librairies. I've installed them into the $(PSPSDK)/lib dir.
Now I'd like to compile a piece of code taken from Shine's graphics.c file (from the LuaPlayer source), just to see if I can display a PNG picture on my PSP.
Compilation is okay, but I keep having the following linker errors :
Code: Select all
make.exe -f "Makefile" all
psp-gcc -I. -I/cygdrive/c/pdev/psp/psp/sdk/include -O2 -G0 -Wall -L. -L/cygdrive/c/pdev/psp/psp/sdk/lib main.o -lpng -lz -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspglue -lpspuser -lpspkernel -o hello.elf
/cygdrive/c/pdev/psp/psp/sdk/lib/libpng.a(pngrtran.o): In function `png_build_gamma_table':
pngrtran.c:(.text+0x1264): undefined reference to `pow'
pngrtran.c:(.text+0x147c): undefined reference to `pow'
pngrtran.c:(.text+0x1524): undefined reference to `pow'
pngrtran.c:(.text+0x163c): undefined reference to `pow'
pngrtran.c:(.text+0x1718): undefined reference to `pow'
/cygdrive/c/pdev/psp/psp/sdk/lib/libpng.a(pngrtran.o):pngrtran.c:(.text+0x1804): more undefined references to `pow' follow
/cygdrive/c/pdev/psp/psp/sdk/lib/libpspglue.a(_open.o): In function `__psp_init_cwd':
/cygdrive/c/cygwin/usr/local/pspdev/pspsdk/sdk/libc/libcglue.c:52: undefined reference to `strrchr'
collect2: ld returned 1 exit status
make: *** [hello.elf] Error 1
I tryed to search these forums, badly I guess, because I can't find an answer :/
By the way, here is my Makefile (I use a custom one from the SDK, not the one generated by Dev-C++) :
Code: Select all
TARGET = hello
OBJS = main.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
# My extra libs
LIBS = -lpng -lz
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Thanks for your answer, I'll try this as soon as I can :)
By the way, what does the "-lm" flag mean ?
The other thing I was wondering : has the libpng to be recompiled from scratch each time I want to compile some code using it ?
It's this kind of error messages :
...that makes me think of this (since pngrtran.c is part of the libpng distribution)
EDIT :
--------
Okay, I added -lm (I guess it's the math funcs lib ?), also -lpspgu, everything compiles fine now.
Thank you very much for your help :)
***
Nb to admins : should I better create a new topic for these questions instead of posting here ?
By the way, what does the "-lm" flag mean ?
The other thing I was wondering : has the libpng to be recompiled from scratch each time I want to compile some code using it ?
It's this kind of error messages :
Code: Select all
pngrtran.c:(.text+0x1264): undefined reference to `pow'
EDIT :
--------
Okay, I added -lm (I guess it's the math funcs lib ?), also -lpspgu, everything compiles fine now.
Thank you very much for your help :)
***
Nb to admins : should I better create a new topic for these questions instead of posting here ?
I get this error message when I run the toolchain script:
I've reinstalled cygwin and the DLL is the latest version. What should I do?
Code: Select all
***proc magic mismatch detected - 0xD94C588A/0xD079E02
This problem is probably due to using incompatible versions of the cygwin DLL
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should* reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
no
configure: error: installation or configuration problem: C compiler can
e executables.
ERROR CONFIGURING BINUTILS
Re: Tutorial problems
Small sugestion:Modab wrote:The current one I am using inside of Dev-C++ is this:Code: Select all
TARGET = bitmapViewer OBJS = main.o pspBMP.o INCDIR = CFLAGS = -O2 -G0 -Wall -I"C:\Program Files\PSPDev\include" CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) LIBDIR = LDFLAGS = EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = Bitmap Viewer v0.1 PSP_EBOOT_ICON = icon.png PSPSDK= C:/Progra~1/PSPDev/psp/sdk include $(PSPSDK)/lib/build.mak
Keep directory structure in this manner:
Code: Select all
[X]
|
+--[Projects]
|
+--[MyProject1]
|
+--[MyProject2]
|
+--[MyProject3]
Code: Select all
CXXFLAGS=$(CFLAGS) -fno-exceptions -fno-rtti
EXTRA_TARGETS = EBOOT.PBP
include $(PSPSDK)/lib/build.mak
Code: Select all
TARGET=MyProject
OBJS=main.o
PSP_EBOOT_TITLE=MyProject v0.1
#uncoment following line if you want (and have) custom icon
#PSP_EBOOT_ICON=icon.png
LIBS= -lpspgu
include ../Makefile.def
Some vars you've defined (INCDIR, CFLAGS, CXXFLAGS, ASFLAGS, LIBDIR, LDFLAGS) are already defined inside build.mak (%PSPSDK%\lib directory). The only value required is PSPSDK environment variable. Instead of typing it in, click right mouse button on My Computer (for Windows Vista: Computer), Properties, Advanced (tab), Environment Variables (button), New (for user or system variables - whatever you feel better; I'm developing on separate account, so user variable is ok for me). Setting environment variable is preferred over setting %PSPDEV% inside makefile.
As stated before - only env var is required when using build.mak.First change that matters, my CFLAGS now has a -I"C:\Program Files\PSPDev\include" bit to it.
Just in case - use dir /x under command line to get DOS file/dir name. It is possible, that "Program Files" is not "Progra~1".I changed "Program Files" to "Progra~1"
-
- Posts: 11
- Joined: Thu Dec 29, 2005 12:32 am
Followed the link in the first post, and there was only a folder, so I followed through a few folders and ended up here:
http://www.cs.purdue.edu/homes/ljbuesch/cs177/lab1/
Which...doesn't show how to setup Dev-C++ ^^;
(It's a quickie guide on Unix...lol)
http://www.cs.purdue.edu/homes/ljbuesch/cs177/lab1/
Which...doesn't show how to setup Dev-C++ ^^;
(It's a quickie guide on Unix...lol)
i nearly got it working now, but there is a linker error and i dunno what might be the problem.
btw. i try to compile the source off the controller sample, so there is an int main(void)..
greets
rapso
maybe it's just a n00b-bug :(...
-lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o .elf
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/crt0.o: In function `_main':
/tmp/pspdev/pspsdk/src/startup/crt0.c:86: undefined reference to `main'
collect2: ld returned 1 exit status
...
btw. i try to compile the source off the controller sample, so there is an int main(void)..
greets
rapso