CXXFLAGS += `pkg-config --cflags zlib`
LDFLAGS += `pkg-config --libs zlib`
Add missing LDFLAGS for zlib (to Makefile)
- Posts: 44
- Joined: 14 Aug 2022
Hi Zenju, when trying to build freefilesync I noticed that the LDFLAGS for zlib are missing. May I suggest you to add these lines to your Makefile (both FFS & RFS). They could be placed near the equivalent lines for the other libraries.
This would automatically add the correct flag, usually "-lz" in that case.
- Site Admin
- Posts: 7210
- Joined: 9 Dec 2007
The "-lz" is already added by "wx-config"
- Posts: 44
- Joined: 14 Aug 2022
Thank you for your reply. Apparently on my system it is not:
$ wx-config --libs std, aui, richtext --debug=no
-L/usr/lib/x86_64-linux-gnu -pthread -lwx_gtk3u_aui-3.2 -lwx_gtk3u_richtext-3.2 -lwx_gtk3u_xrc-3.2 -lwx_gtk3u_html-3.2 -lwx_gtk3u_qa-3.2 -lwx_gtk3u_core-3.2 -lwx_baseu_xml-3.2 -lwx_baseu_net-3.2 -lwx_baseu-3.2
[code]
- Posts: 44
- Joined: 14 Aug 2022
Since the file (zen/zlib_wrap.cpp) that uses it in your code base doesn't apparently depend on wx-widget neither on gtk, I thought it had to be present in the Makefile. But I could be wrong.
- Posts: 44
- Joined: 14 Aug 2022
I actually had the same problem with gtk LDFLAGS which are missing at link time, so I had to add them with
Would you add them to the Makefile please?
Error was:
/usr/bin/ld: /tmp/cc6adrRa.ltrans115.ltrans.o: undefined reference to symbol 'gtk_css_provider_load_from_path'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgtk-3.so.0: error adding symbols: DSO missing from command line
"gtk_css_provider_load_from_path" is used in both
- FreeFileSync/Source/application.cpp
- FreeFileSync/Source/RealTimeSync/application.cpp
LDFLAGS += `pkg-config --libs gtk+-3.0`
Error was:
/usr/bin/ld: /tmp/cc6adrRa.ltrans115.ltrans.o: undefined reference to symbol 'gtk_css_provider_load_from_path'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgtk-3.so.0: error adding symbols: DSO missing from command line
"gtk_css_provider_load_from_path" is used in both
- FreeFileSync/Source/application.cpp
- FreeFileSync/Source/RealTimeSync/application.cpp