Zipstream Incbin Mod Build Error

BlitzMax Forums/Brucey's Modules/Zipstream Incbin Mod Build Error

RustyKristi(Posted 2016) [#1]
Trying out TimelineFX I get this error.


In file included from C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.h:5:0,
from C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.c:1:

koriolis.mod/zipstream.mod/.bmx/zipstream.bmx.debug.win32.x86.h:206:14: note: previous declaration of 'unztell' was here
extern BBINT unztell(BBBYTE* bbt_file);


Although the file says it's not necessary to build timelinefx (which it does build with NG with some small alterations) but incbin with zip is a nice feature to have.


Derron(Posted 2016) [#2]
sounds as if the module needs an ".x"-file for the unztell-part.

I do not know how to write them, so others might jump in here.


bye
Ron


RustyKristi(Posted 2016) [#3]
Thanks Derron, I did read about that last time.

What I'm just trying to do is incbin a timelinefx .eff file. I would like to do SDL folder pathing but also got no clue on how it would work with Timelinefx

not simple as LoadEffects("sdl::myfile.eff") as I'm getting 'Error loading effects file!'


RustyKristi(Posted 2016) [#4]
Checking with Vanilla BMX it works great but with NG I'm getting those previous declaration errors..

I copied it over NG and this is my latest error:


[ 99%] Compiling:zipstreamloader.bmx.debug.win32.x86.c
In file included from C:/BMXNG/mod/rigz.mod/timelinefx.mod/.bmx/timelinefx.bmx.debug.win32.x86.h:8:0,
                 from C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.h:6,
                 from C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.c:1:
C:/BMXNG/mod/gman.mod/zipengine.mod/.bmx/zipengine.bmx.debug.win32.x86.h:518:13: error: conflicting types for 'unzCloseCurrentFile'
 extern void unzCloseCurrentFile(BBBYTE* bbt_zipFilePtr);
             ^
In file included from C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.h:5:0,
                 from C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.c:1:
C:/BMXNG/mod/koriolis.mod/zipstream.mod/.bmx/zipstream.bmx.debug.win32.x86.h:206:14: note: previous declaration of 'unzCloseCurrentFile' was here
 extern BBINT unzCloseCurrentFile(BBBYTE* bbt_file);
              ^
In file included from C:/BMXNG/mod/rigz.mod/timelinefx.mod/.bmx/timelinefx.bmx.debug.win32.x86.h:8:0,
                 from C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.h:6,
                 from C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.c:1:
C:/BMXNG/mod/gman.mod/zipengine.mod/.bmx/zipengine.bmx.debug.win32.x86.h:519:13: error: conflicting types for 'unzClose'
 extern void unzClose(BBBYTE* bbt_zipFilePtr);
             ^
In file included from C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.h:5:0,
                 from C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.c:1:
C:/BMXNG/mod/koriolis.mod/zipstream.mod/.bmx/zipstream.bmx.debug.win32.x86.h:205:14: note: previous declaration of 'unzClose' was here
 extern BBINT unzClose(BBBYTE* bbt_file);
              ^
Build Error: failed to compile C:/BMXNG/mod/rigz.mod/zipstreamloader.mod/.bmx/zipstreamloader.bmx.debug.win32.x86.c
Process complete


I'm confused where to place to .x file and some examples would be nice..

My latest attempt is placing zipstream.x with the following code

int unzClose(BBINT)!


Still getting errors


Brucey(Posted 2016) [#5]
I've updated both the gman ( https://github.com/maxmods/gman.mod ) and koriolis ( https://github.com/maxmods/koriolis.mod ) modules, to clean build with the latest NG.

These are the versions of the modules you should (probably) be using with NG.

I'd beware of having both of them in the same project though, as they both individually build against similar zip/unzip C sources. YMMV ;-)


RustyKristi(Posted 2016) [#6]
I'd beware of having both of them in the same project though, as they both individually build against similar zip/unzip C sources. YMMV ;-)


Thanks Brucey! :D Actually I'm aware of that, it's just timelinefx needs both to work for incbinning files unless I'm missing something new. It works on vanilla bmx btw with the incbinned files.


RustyKristi(Posted 2016) [#7]
Found the instruction here from the author itself and it does work on Vanilla version..

http://www.rigzsoft.co.uk/forums/topic/timelinefx-does-not-support-incbin/#post-3597

I'm getting these errors when building NG (0.79) latest gman and koriolis mod..


C:/BMXNG/MinGW32/bin/ar.exe: creating C:/BMXNG/mod/koriolis.mod/zipstream.mod/zipstream.release.win32.x86.a
C:/BMXNG/mod/koriolis.mod/zipstream.mod/zipstream.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0x110): multiple definition of `unzGetCurrentFileSize'
C:/BMXNG/mod/gman.mod/zipengine.mod/zipengine.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0x80): first defined here
C:/BMXNG/mod/koriolis.mod/zipstream.mod/zipstream.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0x170): multiple definition of `zipOpenNewFileWithPassword'
C:/BMXNG/mod/gman.mod/zipengine.mod/zipengine.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0xe0): first defined here
C:/BMXNG/mod/koriolis.mod/zipstream.mod/zipstream.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0x3b): undefined reference to `koriolis_zipstream_TZipStream_read_file_func'
C:/BMXNG/mod/koriolis.mod/zipstream.mod/zipstream.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0x7b): undefined reference to `koriolis_zipstream_TZipStream_write_file_func'
C:/BMXNG/mod/koriolis.mod/zipstream.mod/zipstream.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0xa3): undefined reference to `koriolis_zipstream_TZipStream_tell_file_func'
C:/BMXNG/mod/koriolis.mod/zipstream.mod/zipstream.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0xdb): undefined reference to `koriolis_zipstream_TZipStream_seek_file_func'
C:/BMXNG/mod/koriolis.mod/zipstream.mod/zipstream.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0x1): undefined reference to `koriolis_zipstream_TZipStream_open_file_func'
C:/BMXNG/mod/koriolis.mod/zipstream.mod/zipstream.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0xf1): undefined reference to `koriolis_zipstream_TZipStream_close_file_func'
C:/BMXNG/mod/koriolis.mod/zipstream.mod/zipstream.release.win32.x86.a(bmxsupport.c.release.win32.x86.o):bmxsupport.c:(.text+0x101): undefined reference to `koriolis_zipstream_TZipStream_testerror_file_func'


I did get my custom version to work with NG, not just the incbin part. I will upload it asap just need to cleanup


Brucey(Posted 2016) [#8]
multiple definition of `unzGetCurrentFileSize'

That's because you have two sets of the same files being compiled into your application.

Ideally, you would want to move the common files into a common module and have those other modules import it. (like how a modular system is meant to work).


RustyKristi(Posted 2016) [#9]
Apparently I'm still fairly new on how BlitzMax module works, particularly NG. The weird part is that (TimelineFX) it works perfectly in vanilla and NG with that tweaking part. It's the incbinning that was later introduced.

I'm not sure if BMX is still supported but if you try to download it on timelinefx website, it will just redirect to a related post.

I'm still looking for other particle system that is simple and works with incbin.