Welcome! Log In Create A New Profile

Advanced

ld.exe Skipping incompatible libz.a when searching for -lz.

Posted by nko12 
ld.exe Skipping incompatible libz.a when searching for -lz.
March 05, 2011 04:55AM
I am EXTREMELY new to Wii development. My knowledge of C++ is also very limited, so if you can answer this, PLEASE keep it simple. Basically, I downloaded libwiigui and after much research, I found out I was missing header files and .a library files, so I installed the missing headers and libraries in C:\devkitPro\libogc. (I keep seeing these things that tell me it's suppose to go in C:\devkitPro\Portlibs, but there is no portlibs directory, whatever that is.) Everything works perfectly until it tries to compile the libz library, where is throws the following error:

> "make"
linking ... libwiigui-demo.elf
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/4.5.1/../../../../powerpc-eabi/bin/ld.exe: skipping incompatible c:/devkitPro/libogc/lib/wii\libz.a when searching for -lz
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/4.5.1/../../../../powerpc-eabi/bin/ld.exe: cannot find -lz
collect2: ld returned 1 exit status
make[1]: *** [/c/users/nkosi/documents/wiiprojects/guilibrary/libwiigui-demo.elf] Error 1
"make": *** [build] Error 2

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

I have no idea why it is doing this, but I've tried finding a solution, and everything I found was either totally unrelated or I didn't understand it. Can someone please tell me what I'm doing wrong?
Re: ld.exe Skipping incompatible libz.a when searching for -lz.
March 05, 2011 06:42AM
Does the template example compile? It should be located in devkit/examples/wii/template (something like that). If this complies, the look at the makefile in that directory and change the line:
LIBS := -logc -lanotherlibrary -lnextfile
If there is no -lz in this list then add it at the end, then compile the template again. If it doesn't compile then try reinstalling devkitPRO.
Re: ld.exe Skipping incompatible libz.a when searching for -lz.
March 05, 2011 09:19PM
You're right, it's saying it can't find zlib.

zlib should be put in C:\devkitPro\portlibs\ppc\

So:

C:\devkitPro\portlibs\ppc\lib\libz.a
C:\devkitPro\portlibs\ppc\include\zconf.h
C:\devkitPro\portlibs\ppc\include\zlib.h
Re: ld.exe Skipping incompatible libz.a when searching for -lz.
March 06, 2011 11:41PM
Thanks Tantric, your solution solved my problem. I made a new folder in C:\devkitPro\portlibs\ppc, and then I made an include and lib folder and put them inside ppc, and then I put the zlib headers and libs in their appropriate spots in these folders, and it worked. Yay

=D
Sorry, only registered users may post in this forum.

Click here to login