Error compiling Fritzing


#1

I need to working in a proyect and I have this bug when I open it, so I’m trying to build fritzing following this instructions. When I’m in the last step qt shows me 13 errors in the compilation output:

./..\debug32\unzip.o: In function `unzCloseCurrentFile':
C:\Users\Develop\Desktop\build-phoenix-Desktop_Qt_5_5_1_MinGW_32bit-Debug/../fritzing-app/src/lib/quazip/unzip.c:1523: undefined reference to `z_inflateEnd'
./..\debug32\zip.o: In function `zipOpenNewFileInZip3':
C:\Users\Develop\Desktop\build-phoenix-Desktop_Qt_5_5_1_MinGW_32bit-Debug/../fritzing-app/src/lib/quazip/zip.c:879: undefined reference to `z_deflateInit2_'
C:\Users\Develop\Desktop\build-phoenix-Desktop_Qt_5_5_1_MinGW_32bit-Debug/../fritzing-app/src/lib/quazip/zip.c:892: undefined reference to `z_get_crc_table'
./..\debug32\zip.o: In function `zipWriteInFileInZip':
C:\Users\Develop\Desktop\build-phoenix-Desktop_Qt_5_5_1_MinGW_32bit-Debug/../fritzing-app/src/lib/quazip/zip.c:992: undefined reference to `z_crc32'
C:\Users\Develop\Desktop\build-phoenix-Desktop_Qt_5_5_1_MinGW_32bit-Debug/../fritzing-app/src/lib/quazip/zip.c:1011: undefined reference to `z_deflate'
./..\debug32\zip.o: In function `zipCloseFileInZipRaw':
C:\Users\Develop\Desktop\build-phoenix-Desktop_Qt_5_5_1_MinGW_32bit-Debug/../fritzing-app/src/lib/quazip/zip.c:1069: undefined reference to `z_deflate'
C:\Users\Develop\Desktop\build-phoenix-Desktop_Qt_5_5_1_MinGW_32bit-Debug/../fritzing-app/src/lib/quazip/zip.c:1082: undefined reference to `z_deflateEnd'
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [..\debug32\Fritzing.exe] Error 1
mingw32-make: *** [debug] Error 2
15:19:49: The process "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project phoenix (kit: Desktop Qt 5.6.0 MinGW 32bit)
When executing step "Make"

I’m using
boost 1.6
libgit2-0.23.4
Qt 5.6
MinGW 32bit

Windows 10 x64

Can someone tell me how could I solve this problem?


#2

I think this is a new issue between mingw and the quazip library we’re using. Building with msvc works.
Btw, we’re now really close to publishing the new release, only a few days away.


#3

Thanks @andre I had already built a version of fritzing but for some reason, it stopped to work yesterday… I tried to compiled with msvc, but seems like I’m missing something. I see in the output: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.

I removed mingw from Qt and I added msvc2015 64bits, I’ve also installed Visual Studio 2015. Do I have to follow this instructions too?

I would have no problem in waiting, but when I was working in the previous version I used a few new parts in my proyect, and I need to do some changes before monday, so I tried to open it in the last available release but I’m seeing the missing parts, there a way to copy those file to that version? I mainly need the NRF24L01+_breakout.fzp part, I copied the file in the same folder of the stable fritzing but it seems like is not working because I’m seeing the same error.

What do you recommend me?


#4

When you install Qt’s msvc2015 libraries, you need Visual Studio (Express will do) with the C++ development tools included. They are deselected by default, probably because of the immense download size. :frowning: Then Qt Creator should be able to auto-detect it as a compiler.
You don’t need to follow the instructions you mentioned, as this is only required if you build Qt itself from source.

If you just need those parts, simply right-click and export them, then import them into the old Fritzing. This will cause a little trouble when you upgrade though, as you will then have two parts with the same module id. You will then need to physically delete the imported one again (at least the .fzp), or change its module id.


#5

Thanks again @andre finally I have Fritzing running again… by the way thanks for all the good work in each release.

I succeeded compiling a 32 bits version.

I only want to have this information for the future:

  • I don’t remember where did I compiled the git2.lib file, I guess that is the reason why the 64b version didn’t work, I thought it was in the files after compile the libgit2 dependency but it wasn’t, can you remember me that?

  • And finally, after the compilation success I had to copy each .dll missing in the build directory, is that a normal step or there is an easy step to copy all files automatically?


#6

Glad it worked! Not sure about the 64bit version, I assume this might depend on which msvc compiler (or which msvc developer console) one is using.
If you launch fritzing from within Qt Creator, you shouldn’t need to copy any dlls as they are all linked from there, only if you try to launch via double-clicking the exe.


#7

Yes I was trying to launch via double-clicking. There a easy way to export all the project to work on it as standalone application? It would be good to have that info in the wiki


#8

In that case you would have to run the platform-specific release script as described here: https://github.com/fritzing/fritzing-app/wiki/4.-Publishing-a-Release

I’ll add a note to the build instructions about this, thanks!