On 2/19/24 18:14 Daniel Harding wrote:
> I'm still curious about the necessity of the new Windows dependency:
> Ws2_32.lib
FLTK always depended on the winsock library, in the past on winsock.lib
(or maybe another name, I can't remember), but since FLTK 1.3.x we were
using winsock2, i.e. ws2_32.lib. It's possible that this library was
loaded dynamically though only on demand so you didn't have to link to
it explicitly. I can't tell exactly when or if this was changed w/o
longer investigation.
The libraries you need to link to with FLTK 1.4 and VS are documented here:
https://www.fltk.org/doc-1.4/basics.html#basics_visual_cpp
> This lib was not required with FLTK 1.3 + the old .sln file.
Comparing the 1.4 docs with the 1.3 docs shows indeed that ws2_32.lib
was not explicitly mentioned in 1.3. As I wrote above, it's possible
that it was linked (loaded) dynamically. But now it's obviously required.
How do you build your project? Do you have your own "hand-made" Visual
Studio project and link to the FLTK libs built by the Visual Studio
project created using CMake? If this is true, then you will very likely
have to add ws2_32.lib (and comctl32.lib) to your linker setup (see the
docs mentioned above).
The other way would be to create your own project with CMake as well. I
know, you're not familiar with CMake, but let's think about it anyway.
If you build your own project with CMake then CMake gets all necessary
informations from the FLTK build by its FLTKConfig.cmake file. This
includes all required libraries and link directories. I can really
recommend this if you are not bound by an existing build system. If you
are interested, I recommend to read our README.CMake.txt file which is
still work in progress.