zynaddsubfx / zyn-fusion-build

Build Scripts For Zyn-Fusion
Do What The F*ck You Want To Public License
122 stars 39 forks source link

Linker error when linking ZynAddSubFX.dll #69

Closed AnClark closed 3 years ago

AnClark commented 3 years ago

I attempt to compile Zyn Fusion on both Msys2 and WSL Ubuntu, but both of them failed on the same error when linking the ZynAddSubFX.dll file, showing this log:

####------------------------Building ZynaddSubFX in release mode-----------------------
...
[100%] Linking CXX shared library ZynAddSubFX.dll
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleIdE4drawEv[_ZN3DGL6CircleIdE4drawEv]+0x3): undefined reference to `DGL::Circle<double>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleIdE11drawOutlineEv[_ZN3DGL6CircleIdE11drawOutlineEv]+0x6): undefined reference to `DGL::Circle<double>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleIfE4drawEv[_ZN3DGL6CircleIfE4drawEv]+0x3): undefined reference to `DGL::Circle<float>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleIfE11drawOutlineEv[_ZN3DGL6CircleIfE11drawOutlineEv]+0x6): undefined reference to `DGL::Circle<float>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleIiE4drawEv[_ZN3DGL6CircleIiE4drawEv]+0x3): undefined reference to `DGL::Circle<int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleIiE11drawOutlineEv[_ZN3DGL6CircleIiE11drawOutlineEv]+0x6): undefined reference to `DGL::Circle<int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleIjE4drawEv[_ZN3DGL6CircleIjE4drawEv]+0x3): undefined reference to `DGL::Circle<unsigned int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleIjE11drawOutlineEv[_ZN3DGL6CircleIjE11drawOutlineEv]+0x6): undefined reference to `DGL::Circle<unsigned int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleIsE4drawEv[_ZN3DGL6CircleIsE4drawEv]+0x3): undefined reference to `DGL::Circle<short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleIsE11drawOutlineEv[_ZN3DGL6CircleIsE11drawOutlineEv]+0x6): undefined reference to `DGL::Circle<short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleItE4drawEv[_ZN3DGL6CircleItE4drawEv]+0x3): undefined reference to `DGL::Circle<unsigned short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL6CircleItE11drawOutlineEv[_ZN3DGL6CircleItE11drawOutlineEv]+0x6): undefined reference to `DGL::Circle<unsigned short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleIdE4drawEv[_ZN3DGL8TriangleIdE4drawEv]+0x3): undefined reference to `DGL::Triangle<double>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleIdE11drawOutlineEv[_ZN3DGL8TriangleIdE11drawOutlineEv]+0x6): undefined reference to `DGL::Triangle<double>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleIfE4drawEv[_ZN3DGL8TriangleIfE4drawEv]+0x3): undefined reference to `DGL::Triangle<float>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleIfE11drawOutlineEv[_ZN3DGL8TriangleIfE11drawOutlineEv]+0x6): undefined reference to `DGL::Triangle<float>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleIiE4drawEv[_ZN3DGL8TriangleIiE4drawEv]+0x3): undefined reference to `DGL::Triangle<int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleIiE11drawOutlineEv[_ZN3DGL8TriangleIiE11drawOutlineEv]+0x6): undefined reference to `DGL::Triangle<int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleIjE4drawEv[_ZN3DGL8TriangleIjE4drawEv]+0x3): undefined reference to `DGL::Triangle<unsigned int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleIjE11drawOutlineEv[_ZN3DGL8TriangleIjE11drawOutlineEv]+0x6): undefined reference to `DGL::Triangle<unsigned int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleIsE4drawEv[_ZN3DGL8TriangleIsE4drawEv]+0x3): undefined reference to `DGL::Triangle<short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleIsE11drawOutlineEv[_ZN3DGL8TriangleIsE11drawOutlineEv]+0x6): undefined reference to `DGL::Triangle<short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleItE4drawEv[_ZN3DGL8TriangleItE4drawEv]+0x3): undefined reference to `DGL::Triangle<unsigned short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL8TriangleItE11drawOutlineEv[_ZN3DGL8TriangleItE11drawOutlineEv]+0x6): undefined reference to `DGL::Triangle<unsigned short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleIdE4drawEv[_ZN3DGL9RectangleIdE4drawEv]+0x3): undefined reference to `DGL::Rectangle<double>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleIdE11drawOutlineEv[_ZN3DGL9RectangleIdE11drawOutlineEv]+0x6): undefined reference to `DGL::Rectangle<double>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleIfE4drawEv[_ZN3DGL9RectangleIfE4drawEv]+0x3): undefined reference to `DGL::Rectangle<float>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleIfE11drawOutlineEv[_ZN3DGL9RectangleIfE11drawOutlineEv]+0x6): undefined reference to `DGL::Rectangle<float>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleIiE4drawEv[_ZN3DGL9RectangleIiE4drawEv]+0x3): undefined reference to `DGL::Rectangle<int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleIiE11drawOutlineEv[_ZN3DGL9RectangleIiE11drawOutlineEv]+0x6): undefined reference to `DGL::Rectangle<int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleIjE4drawEv[_ZN3DGL9RectangleIjE4drawEv]+0x3): undefined reference to `DGL::Rectangle<unsigned int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleIjE11drawOutlineEv[_ZN3DGL9RectangleIjE11drawOutlineEv]+0x6): undefined reference to `DGL::Rectangle<unsigned int>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleIsE4drawEv[_ZN3DGL9RectangleIsE4drawEv]+0x3): undefined reference to `DGL::Rectangle<short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleIsE11drawOutlineEv[_ZN3DGL9RectangleIsE11drawOutlineEv]+0x6): undefined reference to `DGL::Rectangle<short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleItE4drawEv[_ZN3DGL9RectangleItE4drawEv]+0x3): undefined reference to `DGL::Rectangle<unsigned short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Geometry.cpp.obj):Geometry.cpp:(.text$_ZN3DGL9RectangleItE11drawOutlineEv[_ZN3DGL9RectangleItE11drawOutlineEv]+0x6): undefined reference to `DGL::Rectangle<unsigned short>::_draw(bool)'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/ZynAddSubFX_vst.dir/objects.a(Window.cpp.obj):Window.cpp:(.text$_ZN3DGL6Window11PrivateData17onDisplayCallbackEP12PuglViewImpl[_ZN3DGL6Window11PrivateData17onDisplayCallbackEP12PuglViewImpl]+0x5d): undefined reference to `DGL::Widget::PrivateData::display(unsigned int, unsigned int, double, bool)'
collect2.exe: error: ld returned 1 exit status

I ran build-mingw64.sh on Msys2, and build-windows.rb for WSL. And dependencies were installed properly by those two scripts. Are there any solutions? Thanks a lot!

fundamental commented 3 years ago

I've seen errors like these in the past, but I don't personally recall the resolution. There's a chance that it's gone away on its own with some of the build tweaks that I was working on, though I'm fairly sure I've introduced some new ones in the windows build. I'll hopefully be looking into this within the next week, trying to prep things for at least a pre-release 'release'.

AnClark commented 3 years ago

@fundamental On Arch Linux, today I tried to rewrite build-windows.rb into Makefile, and succeed in building the ZynAddSubFX part without those errors above. Maybe I can help. I'll push my modifications to my own fork.

fundamental commented 3 years ago

Heh, it actually builds without modifications to mruby-zest-build/Makefile ? I was sure that I managed to break something when updating the MRuby version from one a few years out of date.

AnClark commented 3 years ago

I won't modify mruby-zest-build/Makefile, and CMake files within other sub-projects.

Here are my Makefiles. Still unfinished, but can build the two components:

Tested under my Arch Linux notebook.