Symbol 'System_Init' not defined

Post a topic about yourself to let others know your skills, hobbies, etc.
Post Reply
wkt
What is PSXDEV?
What is PSXDEV?
Posts: 4
Joined: Feb 03, 2019

Symbol 'System_Init' not defined

Post by wkt » February 3rd, 2019, 6:02 am

Hello
I have a problem with Playstation Development Library for the PSY-Q created by Orion, when I try running compile code using ccpsx I see following error:

C:\USERS\XXX\APPDATA\LOCAL\TEMP\PQ4 : Error : Symbol 'System_Init' not defined
C:\USERS\XXX\APPDATA\LOCAL\TEMP\PQ4 : Error : Symbol 'DataManager_LoadDatas' not defined
C:\USERS\XXX\APPDATA\LOCAL\TEMP\PQ4 : Error : Symbol 'Tim_Load' not defined
C:\USERS\XXX\APPDATA\LOCAL\TEMP\PQ4 : Error : Symbol 'Sprite_Init' not defined
C:\USERS\XXX\APPDATA\LOCAL\TEMP\PQ4 : Error : Symbol 'Sprite_SetPosition' not defined
C:\USERS\XXX\APPDATA\LOCAL\TEMP\PQ4 : Error : Symbol 'System_Exit' not defined

I have tried to change directory for that library I have put in C:\psyq\include and also in my project folder but it still did not work. I have also tried compiling both on windows xp and windows 10 but that did not fix the issue.

User avatar
gwald
Verified
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 282
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Post by gwald » February 3rd, 2019, 10:35 am

This is pretty basic CC stuff,
Symbol not defined means it tried linking to the library and couldn't find it, it's the .a or .lib file, it should go into the lib folder or in your working folder and you tell the compiler to use the library via the -L (library path if it's in a non standard folder) and or -l (library name) (on gcc anyway, it's probably the same).

wkt
What is PSXDEV?
What is PSXDEV?
Posts: 4
Joined: Feb 03, 2019

Post by wkt » February 3rd, 2019, 2:24 pm

gwald wrote: February 3rd, 2019, 10:35 am This is pretty basic CC stuff,
Symbol not defined means it tried linking to the library and couldn't find it, it's the .a or .lib file, it should go into the lib folder or in your working folder and you tell the compiler to use the library via the -L (library path if it's in a non standard folder) and or -l (library name) (on gcc anyway, it's probably the same).
I moved whole library to lib folder and I wrote -l argument but now I have following error...

"C:\PSYQ\LIB\HITMOD.OBJ : Error : File c:\PsyQ\LIB\HITMOD.OBJ is not a valid library file"

User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » February 3rd, 2019, 4:12 pm

An object file is not a library file so you don't need to use -l.

Code: Select all

ccpsx -Xm -Wall -Xo$80001000 main.c example1.obj example2.obj -lexample.lib -omain.cpe,main.sym,main.map
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

wkt
What is PSXDEV?
What is PSXDEV?
Posts: 4
Joined: Feb 03, 2019

Post by wkt » February 4th, 2019, 2:45 am

Shadow wrote: February 3rd, 2019, 4:12 pm An object file is not a library file so you don't need to use -l.

Code: Select all

ccpsx -Xm -Wall -Xo$80001000 main.c example1.obj example2.obj -lexample.lib -omain.cpe,main.sym,main.map
Thanks, that works, although I have new issue, after compiling the game and trying to run it in the emulator I only get black screen (I run examples so it can't be fault of my code).

User avatar
gwald
Verified
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 282
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Post by gwald » February 4th, 2019, 8:08 am

you might want to be more verbose with what you're doing if you want help, we're not mind readers.. yet.

wkt
What is PSXDEV?
What is PSXDEV?
Posts: 4
Joined: Feb 03, 2019

Post by wkt » February 4th, 2019, 9:24 am

gwald wrote: February 4th, 2019, 8:08 am you might want to be more verbose with what you're doing if you want help, we're not mind readers.. yet.
Ok, I don't know how to explain it so I'm sending whole project in the attachment, I'm using psyq compiled for x64 and i use epsxe emulator.
You do not have the required permissions to view the files attached to this post.

User avatar
gwald
Verified
Net Yaroze Enthusiast
Net Yaroze Enthusiast
Posts: 282
Joined: Sep 18, 2013
I am a: programmer/DBA
PlayStation Model: Net Yaroze
Contact:

Post by gwald » February 4th, 2019, 6:36 pm

Hmm.. just had a quick look at what you are trying to do, load two tim files and display them.. via main.c:

// These are a group of files we want to load
DataManager_Files game_datas[] =
{
{"sprite.tim", 0},
{"blur.tim", 0},
{NULL, 0}
};

I think you have two issues:
#1 I don't see where you are load the tim files, you can do this many way's bin2c (hex code in a c file and easiest), I use Net Yaroze with this for testing on emulators I don't know what the psyq equivalent is or actually load it from a CD, which you need to build the iso for, which I don't think you do that.
Ok, so: DataManager_LoadDatas("DATA", game_datas); // from the "DATA" folder
You need to build an iso with the tim files in the DATA folder
Search the forums on how to build the iso.

#2 re the code above, I think the zeros are meant to be RAM address space, this is where your TIM are loaded into RAM. looks like DataManager_LoadDatas manages the RAM address, so the zeros are allocated the correct RAM address.
Hope that helps.

Orion_
Verified
Legendary Programmer
Legendary Programmer
Posts: 240
Joined: Aug 13, 2012
I am a: Programmer
PlayStation Model: Net Yaroze
Location: France
Contact:

Post by Orion_ » February 12th, 2019, 4:51 am

maybe you should read again my tutorial
http://onorisoft.free.fr/psx/tutorial/tuto.htm
and particularly the "CDRom and Data loading philosophy of my library." section and "Creating a valid Psx CD Image."
Retro game development on Playstation and other consoles http://orionsoft.free.fr/

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests