Home » Developing U++ » U++ Developers corner » Use zlib inside another library 
	
		
		
			| Use zlib inside another library [message #47638] | 
			Mon, 20 February 2017 19:41   | 
		 
		
			
				
				
				
					
						  
						mdelfede
						 Messages: 1310 Registered: September 2007 
						
					 | 
					Ultimate Contributor  | 
					 | 
		 
		 
	 | 
 
	
		Hi, 
 
I've got a peculiar problem... I'm importing 'libarchive', which I need to decompress various archive formats. 
On linux no problems, as usual, we've zlib there. 
On windows no zlib, and the libarchive library has 2 options : 
 
1) define HAVE_ZLIB_H, and it will try to include <zlib.h> (which is missing on windows) 
2) not define HAVE_ZLIB_H and it will drop support for this kind of compression. 
 
As we've zlib into z package, I wonder if there's a way to use it without having to patch libarchive sources. 
I mean... is there a way, from package organizer, to make #include <zlib.h> to use the plugin/z/lib/zlib.h one ? 
Possibily without having to hard-code the full path into package organizer, as my libarchive is on a nest OUTSIDE upp folders. 
I tried with compiler option -I, but it needs a complete path. Something like providing a $PACKAGE_PATH into package organizer could do the trick, in this case entering something like 
-I$PACKAGE_PATH("plugin/z")/lib 
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 08:42:02 CET 2025 
 Total time taken to generate the page: 0.05346 seconds 
 |