Page 1 of 1

trying to build from source

Posted: Wed Mar 04, 2009 8:28 am
by harry747
yesterday i downloaded the source code and installed the other stuff that is needed. now the problem is that when i compile, i get lots of errors like this:

"_png_handle_as_unknown", referenced from:
_png_read_info in pngread.o
_png_read_end in pngread.o
"_png_set_mem_fn", referenced from:
_png_create_read_struct_2 in pngread.o
"_png_destroy_struct_2", referenced from:
_png_create_read_struct_2 in pngread.o
_png_destroy_read_struct in pngread.o
_png_destroy_read_struct in pngread.o
_png_destroy_read_struct in pngread.o

what do they mean, and what can i do?

Posted: Wed Mar 04, 2009 8:50 am
by another_commander
It looks like you do not have libpng installed in your system or it is installed incorrectly. You will have to build from source or install precompiled development libraries.

I also think that the error messages say more than just this. Does this appear during linking or during compiling? Some additional information could be useful.

Posted: Wed Mar 04, 2009 9:57 pm
by JensAyton
That’s rather odd. Xcode should be building an appropriately-configured version of libpng for you.

Just to be sure, you should be building Oolite.xcodeproj using Xcode, with the Build All target and (for starters) the Debug configuration. Also, try Clean All Targets from the Build menu.

To get the full error messages, click the third button from the left at the bottom of the build window. This should show you the build transcript, with all build messages as plain text which can be copied and pasted. A copy of the whole build transcript from a clean build would be useful. (Also, which version of Xcode and Mac OS X are you using?)

Posted: Wed Mar 04, 2009 11:24 pm
by harry747
I solved the problem by downloading everything again. now it works.

OSX 10.5.6, xcode 3.1.2

I recently bought an analogue joystick which i couldn't get to work, so I decided to take a look at the source code.