Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
March 11, 2010, 08:39:27 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Join our IRC channel: ##psp-programming on freenode
Home Help Search Shop Login Register
Digg This!
Pages: 1 [2]
Print
Author Topic: funcLib 1.0.1 {Update 14 June 2008}  (Read 12297 times)
Dustcrazy
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 6
591.96 points

View Inventory
Send Money to Dustcrazy

View Profile
« Reply #15 on: March 11, 2008, 02:16:00 PM »

Sorry for the bump, but I can't get the Hello World to compliy..

Quote
Owner@your-rvlnhr6v8d ~/funclib/demos/helloworld
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150   -c -o main.o m
ain.c
main.c: In function 'main':
main.c:42: warning: implicit declaration of function 'graphicsBeginFrame'
main.c:76: warning: implicit declaration of function 'graphicsEndFrame'
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150   -c -o ../../Co
de/flCallbacks.o ../../Code/flCallbacks.c
../../Code/flCallbacks.c: In function 'callbackExit':
../../Code/flCallbacks.c:19: warning: implicit declaration of function 'flTerminate'
../../Code/flCallbacks.c: In function 'callbackCreateThread':
../../Code/flCallbacks.c:62: warning: implicit declaration of function 'debugError'
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150   -c -o ../../Co
de/flDebug.o ../../Code/flDebug.c
../../Code/flDebug.c: In function 'debugError':
../../Code/flDebug.c:47: error: 'DEBUG_ARGEXTEND' undeclared (first use in this function)
../../Code/flDebug.c:47: error: (Each undeclared identifier is reported only once
../../Code/flDebug.c:47: error: for each function it appears in.)
../../Code/flDebug.c:48: warning: implicit declaration of function 'memQalloc'
../../Code/flDebug.c:48: warning: initialization makes pointer from integer without a cast
../../Code/flDebug.c:50: error: 'va_list' undeclared (first use in this function)
../../Code/flDebug.c:50: error: expected ';' before 'tempArgList'
../../Code/flDebug.c:51: warning: implicit declaration of function 'va_start'
../../Code/flDebug.c:51: error: 'tempArgList' undeclared (first use in this function)
../../Code/flDebug.c:53: warning: implicit declaration of function 'va_end'
../../Code/flDebug.c:72: error: 'graphicsDrawBuffer' undeclared (first use in this function)
../../Code/flDebug.c:85: error: 'graphicsDispBuffer' undeclared (first use in this function)
../../Code/flDebug.c:99: warning: implicit declaration of function 'flTerminate'
../../Code/flDebug.c:109: warning: implicit declaration of function 'memFree'
../../Code/flDebug.c: In function 'debugCriticalError':
../../Code/flDebug.c:281: error: 'DEBUG_ARGEXTEND' undeclared (first use in this function)
../../Code/flDebug.c:282: warning: initialization makes pointer from integer without a cast
../../Code/flDebug.c:284: error: 'va_list' undeclared (first use in this function)
../../Code/flDebug.c:284: error: expected ';' before 'tempArgList'
../../Code/flDebug.c:285: error: 'tempArgList' undeclared (first use in this function)
../../Code/flDebug.c:301: warning: implicit declaration of function 'debugScreenshot'
../../Code/flDebug.c:310: error: 'graphicsDrawBuffer' undeclared (first use in this function)
../../Code/flDebug.c:323: error: 'graphicsDispBuffer' undeclared (first use in this function)
../../Code/flDebug.c: In function 'debugLog':
../../Code/flDebug.c:396: error: 'DEBUG_ARGEXTEND' undeclared (first use in this function)
../../Code/flDebug.c:397: warning: initialization makes pointer from integer without a cast
../../Code/flDebug.c:399: error: 'va_list' undeclared (first use in this function)
../../Code/flDebug.c:399: error: expected ';' before 'tempArgList'
../../Code/flDebug.c:400: error: 'tempArgList' undeclared (first use in this function)
../../Code/flDebug.c:405: error: 'File' undeclared (first use in this function)
../../Code/flDebug.c:405: error: 'tempFile' undeclared (first use in this function)
../../Code/flDebug.c:405: warning: implicit declaration of function 'fileOpen'
../../Code/flDebug.c:405: error: 'FILE_MODE_APPEND' undeclared (first use in this function)
../../Code/flDebug.c:425: warning: implicit declaration of function 'filePuts'
../../Code/flDebug.c:434: warning: implicit declaration of function 'fileClose'
../../Code/flDebug.c: In function 'debugStatusLog':
../../Code/flDebug.c:445: error: 'DEBUG_ARGEXTEND' undeclared (first use in this function)
../../Code/flDebug.c:446: warning: initialization makes pointer from integer without a cast
../../Code/flDebug.c:448: error: 'va_list' undeclared (first use in this function)
../../Code/flDebug.c:448: error: expected ';' before 'tempArgList'
../../Code/flDebug.c:449: error: 'tempArgList' undeclared (first use in this function)
../../Code/flDebug.c: At top level:
../../Code/flDebug.c:467: warning: conflicting types for 'debugScreenshot'
../../Code/flDebug.c:301: warning: previous implicit declaration of 'debugScreenshot' was here
../../Code/flDebug.c: In function 'debugScreenshot':
../../Code/flDebug.c:468: error: 'Texture' undeclared (first use in this function)
../../Code/flDebug.c:468: error: 'tempScreen' undeclared (first use in this function)
../../Code/flDebug.c:468: warning: implicit declaration of function 'texScreenshot'
../../Code/flDebug.c:479: error: 'File' undeclared (first use in this function)
../../Code/flDebug.c:479: error: 'tempFile' undeclared (first use in this function)
../../Code/flDebug.c:479: error: 'FILE_MODE_READ' undeclared (first use in this function)
../../Code/flDebug.c:479: error: 'FILE_MODE_BINARY' undeclared (first use in this function)
../../Code/flDebug.c:493: warning: implicit declaration of function 'texSave'
make: *** [../../Code/flDebug.o] Error 1
Logged


Flatmush
Has a normal user title
Administrator
Hero Member
*

Karma: +83/-26
Offline Offline

Posts: 1046
12906.27 points

View Inventory
Send Money to Flatmush

The Omniscient One


View Profile WWW
« Reply #16 on: March 11, 2008, 02:30:18 PM »

Sorry the release was rather rushed together.
'graphicsBeginFrame' and 'graphicsEndFrame' are no longer used.
The includes point to the wrong directory, look at the directory structure and it should be simple to fix that.
And the makefile needs -lfpu included.

It's better to work with the bigger samples like flAstro, they should all be fixed.

If you want I can upload a snapshot of my funcLib directory where pretty much everything compiles.
Logged

Firmware History: 2.60 -> 2.71 -> 1.50 -> 3.03oe-c

I am nerdier than 66% of all people. Are you nerdier? Click here to find out!I am 62% loser. What about you? Click here to find out!NerdTests.com User Test: The Can I Run A Business Test.

Hehe I'm a "Hero Member" because I bought posts back when they were in the shop.

Creator of FlatEditPSP, funcLib and flAstro
Dustcrazy
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 6
591.96 points

View Inventory
Send Money to Dustcrazy

View Profile
« Reply #17 on: March 11, 2008, 09:13:49 PM »

If its not too much to ask... But yeh I'll look at the bigger examples.. Thanks for such a wonderful library of functions =D
Logged
Flatmush
Has a normal user title
Administrator
Hero Member
*

Karma: +83/-26
Offline Offline

Posts: 1046
12906.27 points

View Inventory
Send Money to Flatmush

The Omniscient One


View Profile WWW
« Reply #18 on: March 12, 2008, 06:46:18 AM »

Here you go, fixed it so that helloWorld now compiles.
HelloWorld was more for my benefit whilst I was programming the earliest modules into funcLib, it's not the best example of how to use funclib. Better examples are minesweeper and some of the sprite demos.
Logged

Firmware History: 2.60 -> 2.71 -> 1.50 -> 3.03oe-c

I am nerdier than 66% of all people. Are you nerdier? Click here to find out!I am 62% loser. What about you? Click here to find out!NerdTests.com User Test: The Can I Run A Business Test.

Hehe I'm a "Hero Member" because I bought posts back when they were in the shop.

Creator of FlatEditPSP, funcLib and flAstro
PaulC
Newbie
*

Karma: +2/-1
Offline Offline

Posts: 49
1661.44 points

View Inventory
Send Money to PaulC

View Profile
« Reply #19 on: March 13, 2008, 02:25:21 AM »

Nice library, I'll keep it for reference, but there's a lot of 'undefined reference' errors, I don't think anything compiles.
Logged
Flatmush
Has a normal user title
Administrator
Hero Member
*

Karma: +83/-26
Offline Offline

Posts: 1046
12906.27 points

View Inventory
Send Money to Flatmush

The Omniscient One


View Profile WWW
« Reply #20 on: March 13, 2008, 05:17:22 AM »

Like I said, it does compile its just some of the older stuff still uses old versions of the lib.

Basically things that need to be fixed are
#1. add "-lpspvfpu -lpspfpu" to the libs line of the makefile.
#2. The only funclib object should be funcLib.o
#3. Only include "funclib.h" at the top of the file now (with the correct path) none of the other funclib includes are required.
#4. Remove all graphicsBeginFrame() and graphicsEndFrame() as they are no longer used.
#5. Use this as the main thread attributes:
"PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER | PSP_THREAD_ATTR_FUNCLIB);"
#6. If you downloaded the release that was on our website or the first post of this thread then you may need to check that the includes point to the correct directory.

Undefined references are caused by points 2, 6 and 4, possibly 1 aswell.

Any other problems that you might have can probably be fixed by modifying the "flConfiguration.h" file which has instructions in it.

By the time we released this I was quite busy with other stuff so we never really put enough effort in to make sure the samples worked.
« Last Edit: March 13, 2008, 05:22:22 AM by Flatmush » Logged

Firmware History: 2.60 -> 2.71 -> 1.50 -> 3.03oe-c

I am nerdier than 66% of all people. Are you nerdier? Click here to find out!I am 62% loser. What about you? Click here to find out!NerdTests.com User Test: The Can I Run A Business Test.

Hehe I'm a "Hero Member" because I bought posts back when they were in the shop.

Creator of FlatEditPSP, funcLib and flAstro
araya
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1
141.99 points

View Inventory
Send Money to araya

View Profile
« Reply #21 on: March 19, 2008, 08:41:09 AM »

I'm trying to compile sample programs, but I keep getting psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -g -O2 -G0 -Wall -D_PSP_FW_VERSION=150   -c -o ../../Code/funcLib.o ../../Code/funcLib.c
../../Code/funcLib.c:1:21: error: funclib.h: No such file or directory
.
This happens with every sample. What am I doing wrong?
Logged
Sleepy
C/C++ Developer
Full Member
*

Karma: +98/-55
Offline Offline

Posts: 192
299.57 points

View Inventory
Send Money to Sleepy


View Profile WWW
« Reply #22 on: June 11, 2008, 02:22:27 PM »

At the very top of main.c, change
Code:
#include ../../Code/funcLib.h

to

Code:
#include ././Code/funcLib.h

and tell me if that fixes the problem.
Logged

Creator and programmer of funcLib
[funcLib Home]
A_Nub
gibbocool rules!
C/C++ Developer
Hero Member
*

Karma: +104/-28
Offline Offline

Posts: 912
3894.18 points

View Inventory
Send Money to A_Nub

Noob am I


View Profile WWW
« Reply #23 on: June 11, 2008, 03:23:09 PM »

Sleepy that will do nothing at all.
Logged

Code:
      ____________________
 /---/   ---------------   \---\
/   O   |               |   ?   \
| O   O |               | ||  O |
|   O   |_______________|   X   |
\--- (#) () oo PSP oo ()()   ---/
    \-----------------------/
[/CENTER]
InsertWittyName: That's like saying because you wank with your right hank all the time, and one day you wank with your left, that you invented left handed wanking..
Sleepy
C/C++ Developer
Full Member
*

Karma: +98/-55
Offline Offline

Posts: 192
299.57 points

View Inventory
Send Money to Sleepy


View Profile WWW
« Reply #24 on: June 11, 2008, 04:42:06 PM »

Love you A_Nub.

Anyways, I have gone through all of the Samples, Apps, and Betas and fixed them like Flatmush recommended with his 6 steps. Hopefully everything will work out of the box now.

Please keep reporting errors.

-Sleepy

P.S. - Sorry about the 3+ month delay, I just stopped by today for the first time in about a year. No, I'm not out of retirement.

P.S.S. - Download is available here. More specifically, here.
« Last Edit: June 11, 2008, 05:07:48 PM by Sleepy » Logged

Creator and programmer of funcLib
[funcLib Home]
Flatmush
Has a normal user title
Administrator
Hero Member
*

Karma: +83/-26
Offline Offline

Posts: 1046
12906.27 points

View Inventory
Send Money to Flatmush

The Omniscient One


View Profile WWW
« Reply #25 on: June 12, 2008, 09:54:05 AM »

Thanks Sleepy Smile
Logged

Firmware History: 2.60 -> 2.71 -> 1.50 -> 3.03oe-c

I am nerdier than 66% of all people. Are you nerdier? Click here to find out!I am 62% loser. What about you? Click here to find out!NerdTests.com User Test: The Can I Run A Business Test.

Hehe I'm a "Hero Member" because I bought posts back when they were in the shop.

Creator of FlatEditPSP, funcLib and flAstro
Sleepy
C/C++ Developer
Full Member
*

Karma: +98/-55
Offline Offline

Posts: 192
299.57 points

View Inventory
Send Money to Sleepy


View Profile WWW
« Reply #26 on: June 14, 2008, 05:28:14 PM »

Alright, it has risen to my attention (MK2k, PSPJunkie) that funcLib was not at all fixed. This is because somehow the file uploaded was incorrect, and QJ also got the wrong link. It has been fixed on the site (for real this time), but QJ still has the wrong one. I'm trying to get this fixed right now.

Thank you MK2k and PSPJunkie for pointing this out to me Smile

Enjoy the real funcLib 1.0.1 now Very Happy
Logged

Creator and programmer of funcLib
[funcLib Home]
st3ph3n
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 12
810.47 points

View Inventory
Send Money to st3ph3n

View Profile
« Reply #27 on: March 11, 2009, 01:32:27 AM »

Hi, Does this funcLib need to be compile to install? Or only need to copy to a specific folder? Cause I can't compile the hello world. Sorry if this question is too naive, but I'm a newbie in psp programing. The error I got is listed below. I put the funcLib folder in cygwin/funclib. Pls. help. Thanks in advance.
Code:
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150   -c -o main.o main.c
In file included from ../../Code/flGlobal.h:19,
                 from ../../Code/funcLib.h:5,
                 from main.c:1:
../../Code/flDefines.h:49:1: warning: "GU_SYNC_WAIT" redefined
In file included from ../../Code/flGlobal.h:13,
                 from ../../Code/funcLib.h:5,
                 from main.c:1:
/usr/local/pspdev/psp/sdk/include/pspgu.h:278:1: warning: this is the location o
f the previous definition
In file included from ../../Code/flGlobal.h:19,
                 from ../../Code/funcLib.h:5,
                 from main.c:1:
../../Code/flDefines.h:50:1: warning: "GU_SYNC_NOWAIT" redefined
In file included from ../../Code/flGlobal.h:13,
                 from ../../Code/funcLib.h:5,
                 from main.c:1:
/usr/local/pspdev/psp/sdk/include/pspgu.h:279:1: warning: this is the location o
f the previous definition
make: *** No rule to make target `Code/funcLib.o', needed by `flHelloWorld.elf'.
  Stop.
« Last Edit: March 11, 2009, 02:28:58 AM by st3ph3n » Logged
Flatmush
Has a normal user title
Administrator
Hero Member
*

Karma: +83/-26
Offline Offline

Posts: 1046
12906.27 points

View Inventory
Send Money to Flatmush

The Omniscient One


View Profile WWW
« Reply #28 on: March 11, 2009, 05:26:16 AM »

Ah that is because funclib is starting to show its age.

You need to modify flGlobal.h and remove the defines for GU_SYNC_WAIT and GU_SYNC_NOWAIT.

The defines were added way back when those macros weren't defined in the sdk, but now they are it's complaining that they're redefined. If you get any more errors don't hesitate to PM me and I will help you fix them.
Logged

Firmware History: 2.60 -> 2.71 -> 1.50 -> 3.03oe-c

I am nerdier than 66% of all people. Are you nerdier? Click here to find out!I am 62% loser. What about you? Click here to find out!NerdTests.com User Test: The Can I Run A Business Test.

Hehe I'm a "Hero Member" because I bought posts back when they were in the shop.

Creator of FlatEditPSP, funcLib and flAstro
Pages: 1 [2]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.242 seconds with 35 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com