| View previous topic :: View next topic |
| Author |
Message |
Twenty 2
Joined: 25 Jul 2005 Posts: 15
|
Posted: Mon Aug 01, 2005 3:58 am Post subject: |
|
|
[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? |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Mon Aug 01, 2005 4:18 am Post subject: |
|
|
| 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? |
Please read the common errors and solutions page, it has your answer. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
Twenty 2
Joined: 25 Jul 2005 Posts: 15
|
Posted: Mon Aug 01, 2005 4:28 am Post subject: |
|
|
| ya im a newb to this so i dont exactly know what to look for |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Tue Aug 02, 2005 1:17 am Post subject: |
|
|
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. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
Twenty 2
Joined: 25 Jul 2005 Posts: 15
|
Posted: Tue Aug 02, 2005 2:38 am Post subject: |
|
|
| Sorry i knew where the thread was i just didnt know which would answer my question... |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Tue Aug 02, 2005 3:44 am Post subject: |
|
|
If you look at your code, you will see that you have: | 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 |
Does that not look similar to: | 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! |
|
| Back to top |
|
 |
Twenty 2
Joined: 25 Jul 2005 Posts: 15
|
Posted: Tue Aug 02, 2005 3:47 am Post subject: |
|
|
| wow.. im not a morning person lol but thnx man. |
|
| Back to top |
|
 |
Mura
Joined: 02 Aug 2005 Posts: 2
|
Posted: Wed Aug 03, 2005 3:23 pm Post subject: |
|
|
| sicksand 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.
| Code: |
C:\Dev-Cpp\project\Makefile [Build Error] No rule to make target `main.o', needed by `project.elf'. Stop. |
details :
my project.dev file is in Dev-Cpp folder, my project file, main.c and Makefile are in a directory named testpower
| Code: |
-Dev-Cpp
|_ project1.dev
|_ testpower
|_ main.c
|_ Makefile
|_devcpp.exe
|
thanks.[/code] |
I got the same error ,please help
BTW,in console mode ,there was no error |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Wed Aug 03, 2005 11:07 pm Post subject: |
|
|
| Mura wrote: | I got the same error ,please help
BTW,in console mode ,there was no error |
Are you using a custom make file? or an auto-generated one? _________________ Lego of my Ago! |
|
| Back to top |
|
 |
Mura
Joined: 02 Aug 2005 Posts: 2
|
Posted: Thu Aug 04, 2005 2:16 am Post subject: |
|
|
I know the problem now.
We should put the project file (*.dev) and the "makefile" in a same directory.
Thank you for your help :)
lol |
|
| Back to top |
|
 |
Squall333
Joined: 28 Apr 2005 Posts: 91
|
Posted: Fri Aug 19, 2005 8:43 am Post subject: |
|
|
I keep getting
makefile:17: C:/pspdev/psp/sdk: Permission denied
makefile:17: /lib/build.mak: No such file or directory
make: *** No rule to make target `/lib/build.mak'. Stop. |
|
| Back to top |
|
 |
XRS
Joined: 15 May 2005 Posts: 32
|
Posted: Sat Aug 27, 2005 3:34 am Post subject: |
|
|
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... |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Sat Aug 27, 2005 5:47 am Post subject: |
|
|
| 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... |
The win32 package is outdated, and I have udpated the page to point to the programming FAQ wiki page.
After you read the wiki, then follow the rest of the directions in order to set it up. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
XRS
Joined: 15 May 2005 Posts: 32
|
Posted: Sat Aug 27, 2005 10:25 pm Post subject: |
|
|
Oh, ok!
Thanks...i will read it! |
|
| Back to top |
|
 |
maestun
Joined: 01 Sep 2005 Posts: 2
|
Posted: Tue Sep 06, 2005 5:50 pm Post subject: |
|
|
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 :
| Code: | 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 |
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++) :
| Code: | 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 |
Any help would be greatly appreciated, thanks ! |
|
| Back to top |
|
 |
holger
Joined: 18 Aug 2005 Posts: 204
|
Posted: Tue Sep 06, 2005 10:38 pm Post subject: |
|
|
| try adding -lm to your LFLAGS/LDFLAGS/LIBS. Maybe you also want to update your toolchain (and move the old toolchain tree away to keep it clean) -- as far I know libpspglue.a is not used anymore. |
|
| Back to top |
|
 |
maestun
Joined: 01 Sep 2005 Posts: 2
|
Posted: Wed Sep 07, 2005 5:45 pm Post subject: |
|
|
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 :
| Code: | | pngrtran.c:(.text+0x1264): undefined reference to `pow' |
...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 ? |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Thu Sep 08, 2005 3:13 am Post subject: |
|
|
It's fine to post that here, cause others may have questions about it....
and yes, -lm links in the math library. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
Mr.Modem
Joined: 21 Sep 2005 Posts: 28
|
Posted: Fri Sep 30, 2005 3:31 am Post subject: |
|
|
I get this error message when I run the toolchain script:
| Code: |
***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 |
I've reinstalled cygwin and the DLL is the latest version. What should I do? |
|
| Back to top |
|
 |
urchin
Joined: 02 Jun 2005 Posts: 121
|
Posted: Fri Sep 30, 2005 3:44 am Post subject: |
|
|
Sounds like you have two different versions of cygwin clashing somehow.
I once hit the same problem opening a bash window and running an older cygwin version of make (killing the build process that had been running in another window for 4 hours grumble grumble) |
|
| Back to top |
|
 |
Mr.Modem
Joined: 21 Sep 2005 Posts: 28
|
Posted: Fri Sep 30, 2005 5:03 am Post subject: |
|
|
| I don't think I have two version of Cygwin running |
|
| Back to top |
|
 |
urchin
Joined: 02 Jun 2005 Posts: 121
|
Posted: Fri Sep 30, 2005 5:28 am Post subject: |
|
|
| Did you follow the error instructions and see how many copies of "cygwin1.dll" you have on your machine? |
|
| Back to top |
|
 |
Mr.Modem
Joined: 21 Sep 2005 Posts: 28
|
Posted: Sat Oct 01, 2005 1:23 am Post subject: |
|
|
| I've reinstalled Cygwin (again) and I didn't get the error. I guess there were something wrong with my previous installation. |
|
| Back to top |
|
 |
Kro
Joined: 15 Sep 2005 Posts: 10
|
Posted: Mon Oct 03, 2005 9:02 am Post subject: Re: Tutorial problems |
|
|
| Modab wrote: | The current one I am using inside of Dev-C++ is this:
| Code: |
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 |
|
Small sugestion:
Keep directory structure in this manner:
| Code: |
[X]
|
+--[Projects]
|
+--[MyProject1]
|
+--[MyProject2]
|
+--[MyProject3]
|
Where X is whatever you wish (DevCpp directory, its subdir, directory aoutside DevCpp - whatever). You can place Makefile.def inside Projects directory:
| Code: |
CXXFLAGS=$(CFLAGS) -fno-exceptions -fno-rtti
EXTRA_TARGETS = EBOOT.PBP
include $(PSPSDK)/lib/build.mak
|
And for each project create makefile (and set as a custom makefile for given project), e.g.
| Code: |
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
|
These are the only project-specific values for 90% of your projects (of course values assigned to variables will vary).
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.
| Quote: | | First change that matters, my CFLAGS now has a -I"C:\Program Files\PSPDev\include" bit to it. |
As stated before - only env var is required when using build.mak.
| Quote: | | I changed "Program Files" to "Progra~1" |
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". |
|
| Back to top |
|
 |
jsharrad
Joined: 20 Oct 2005 Posts: 102
|
Posted: Thu Oct 20, 2005 3:12 am Post subject: |
|
|
| Is there any way to make it so dev-cpp can make a v1.5 eboot like using "make kxploit" in cygwin? |
|
| Back to top |
|
 |
LordCthulu
Joined: 29 Dec 2005 Posts: 11
|
Posted: Fri Jan 13, 2006 4:04 am Post subject: |
|
|
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) |
|
| Back to top |
|
 |
UsefulIdiot
Joined: 17 Jan 2006 Posts: 13
|
Posted: Sun Jan 22, 2006 7:54 am Post subject: |
|
|
| anyone got a mirror of this? |
|
| Back to top |
|
 |
rapso
Joined: 28 Mar 2005 Posts: 147
|
Posted: Fri Jan 27, 2006 12:47 pm Post subject: |
|
|
i nearly got it working now, but there is a linker error and i dunno what might be the problem.
| Quote: |
...
-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
...
|
maybe it's just a n00b-bug :(
btw. i try to compile the source off the controller sample, so there is an int main(void)..
greets
rapso |
|
| Back to top |
|
 |
Schmede
Joined: 12 Feb 2006 Posts: 3
|
Posted: Sun Feb 12, 2006 7:32 pm Post subject: |
|
|
@Agoln: Somehow your links is dead.
So would someone please post a new
link to the tutorial?
Thx |
|
| Back to top |
|
 |
mako
Joined: 21 Feb 2006 Posts: 4
|
Posted: Tue Feb 21, 2006 8:38 am Post subject: |
|
|
| Schmede wrote: | @Agoln: Somehow your links is dead.
So would someone please post a new
link to the tutorial?
Thx |
ditto. Please link us, as I would love to be able to c for psp, but cygwin didn't work for me... |
|
| Back to top |
|
 |
|