You are not logged in.

#1 2009-07-26 15:05:15

7soccerbo7
Member

[RESOLVED] cannot find -lpng

I am trying to compile my application, but i get this:

c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-gekko/4.2.4/../../../../powerpc-gekko/bin/ld.exe: cannot find -lpng
collect2: ld returned 1 exit status

Offline

 

#2 2009-07-26 15:40:56

BlueChip
Moderator

Re: [RESOLVED] cannot find -lpng

The answer to this is different if you are running SVN or dowload package - which are you using [I recommend the former]

BC


I can be found on efnet, freenode, msn, gtalk, aim, ychat & icq ...PM me for details

Offline

 

#3 2009-07-26 22:30:48

7soccerbo7
Member

Re: [RESOLVED] cannot find -lpng

i think i fixed that but now it says:
undefined reference to `GRRLIB_Init'

and undefined reference to all GRRLIB functions

Offline

 

#4 2009-07-27 00:52:27

BlueChip
Moderator

Re: [RESOLVED] cannot find -lpng

The answer to ^this^ is *also* different if you are running SVN or dowload package - which are you using now? [I continue to recommend the former (Ie. SVN)]

BC


I can be found on efnet, freenode, msn, gtalk, aim, ychat & icq ...PM me for details

Offline

 

#5 2009-07-30 08:04:15

daysanew
Member

Re: [RESOLVED] cannot find -lpng

I am also having the same problem. I make a new project then copy the template files, then copy the GRRLIB dir to my source dir. first I get a cannot find grrlib.h, so I change the include in the main.c file to #include "GRRLIB/GRRLIB/GRRLIB.h", from #include "../../../GRRLIB/GRRLIB/GRRLIB.h". But when I try to complie it again I get eh cannot find -1png. I'm not sure whats up, I'm using the make file that came with teh template and everything

and oh btw I'm using the download package (never tried using svn, not sure where I can get a program to download from there....)

Last edited by daysanew (2009-07-30 08:27:44)

Offline

 

#6 2009-07-30 08:31:33

daysanew
Member

Re: [RESOLVED] cannot find -lpng

Ok like the previous poster I got the first part fixed by putt the .a files and dir in the right folders (could not find any documentation for this at all, found an answer while I was looking at alternative libraries), but now when I compile I get

> "make"
linking ... test.elf
main.o: In function `main':
c:/Projects/Wii/test/source/main.c:26: undefined reference to `GRRLIB_Init'
c:/Projects/Wii/test/source/main.c:33: undefined reference to `GRRLIB_Render'
collect2: ld returned 1 exit status
make[1]: *** [/c/Projects/Wii/test/test.elf] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:00

Once again the only thing Ive changed from teh main template file is the include statement

Offline

 

#7 2009-07-30 10:45:16

BlueChip
Moderator

Re: [RESOLVED] cannot find -lpng

For the download version you need to put grrlib.c in your project directory and compile it in to your code - because although it is called "grrlib" it is NOT a lib ...the latest SVN version IS a proper C library (and also has an installer for the png & jpg libraries)

BC


I can be found on efnet, freenode, msn, gtalk, aim, ychat & icq ...PM me for details

Offline

 

#8 2009-07-30 15:44:02

daysanew
Member

Re: [RESOLVED] cannot find -lpng

I do have grrlib.c in my project library, its in my source/grrlib/grrlib file, it finds the heade file itself, but for somereason its not finding those two references.

So how do I access the svn, whats a good program to use for that?

Offline

 

#9 2009-07-30 16:00:08

daysanew
Member

Re: [RESOLVED] cannot find -lpng

I've found the thread about how to use svn, but I'm still wondering whats wrong.

Offline

 

#10 2009-07-30 16:23:41

daysanew
Member

Re: [RESOLVED] cannot find -lpng

Ok I figured the problem out, misunderstood your last statement.
I also got the latest version from the trunk dir on the svn
I guess the version where grrlib is a lib is in the brank, what do I need to do to get it installed and working?

Offline

 

#11 2009-07-30 20:09:05

BlueChip
Moderator

Re: [RESOLVED] cannot find -lpng

The main reason why the lib is still a branch is because I am struggling to find a "friendly" way to get function inlining working properly ...I can do it, and it needs to be done, but it looks like it will make the include path throughout the code quite ugly.  This will not be any concern to you, but it will be of concern to people who wish to add to it hmm
What I am saying is ...the lib-conversion branch code is working just fine, and it is safe to use as of now - and as a bonus you get the new compose() function

Remember - if you are upgrading from the downloaded version to ANY (recent) svn version - you will NEED to make all your textures pointers
Don't panic ...just add *'s as shown here
  GRRLIB_texImg  splash = GRRLIB_LoadTexture(img_CSystemsSplash);
becomes
  GRRLIB_texImg*  splash = GRRLIB_LoadTexture(img_CSystemsSplash);

BC


I can be found on efnet, freenode, msn, gtalk, aim, ychat & icq ...PM me for details

Offline

 

#12 2009-07-30 20:43:52

daysanew
Member

Re: [RESOLVED] cannot find -lpng

Ok I got the program to copy, but I tried to run it (load it to hbc over my wifi connection) and I get the following error now:

> "make" run
psoload lesson1.dol
"make": psoload: Command not found
"make": *** [run] Error 127

Edit: NM look at another make file of a program I've used, gonna change PSOLOAD to wiiloader.exe

Last edited by daysanew (2009-07-30 20:46:01)

Offline

 

Board footer

Powered by FluxBB