zlib linking

Ran into the following:

  
src/testApp.cpp||In member function ‘virtual void testApp::keyPressed(int)’:|  
src/testApp.cpp|388|warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses]|  
/usr/bin/ld: /usr/lib64/libgio-2.0.so||undefined reference to symbol 'inflateInit2_'|  
||note: 'inflateInit2_' is defined in DSO /usr/lib64/libz.so.1 so try adding it to the linker command line|  
||=== Build finished: 1 errors, 1 warnings (0 minutes, 4 seconds) ===|  
  

In case anyone else runs into this to get any examples running on Linux Mint Debian I had to add the following to the makefile:

  
USER_LDFLAGS = /usr/lib/libz.so.1  

I just ran into this running an older version of OF (0.7.0)

ld in more recent versions has been changed to require that executables explicitly link against the libraries that provide the symbols used by the executable. In previous versions, it was sufficient for these libraries to be pulled in indirectly.

The missing library here is libz.

So you can add -lz to the linking commands, put it at the end.