Project

General

Profile

Can't link on windows without boost compiled libraries

Added by Tibor Peak almost 5 years ago

I tried many ways to compile Witty 4 not to require boost date_time, etc compiled libs (as Release Notes states it is not needed anymore), but "/DEFAULTLIB:"boost_date_time-vc141-mt-gd-x64-1_69.lib"" is present in compiled wt.lib, and my WT project linkage fails, not finding that library.

In Cmake I set asio to 'standalone', provide the asio library, but it does not help.

So WT itself can be compiled without that boost lib, but my project that is using WT, cannot.

Used tools:

- Visual Studio 2017

- Cmake 3.14.8

  • Witty 4.0.5

I attach the Cmake cash file.

Any help would be appreciated.

Tibor


Replies (2)

RE: Can't link on windows without boost compiled libraries - Added by Roel Standaert almost 5 years ago

The first thing I'm noticing is that BOOST_DYNAMIC is set to ON and SHARED_LIBS is set to OFF.

Wt 4 still depends on Boost libraries, but not in its headers. So the compiled version of Wt that we distribute no longer forces your application to depend on Boost because the few Boost libraries that we're still using are baked into Wt's DLLs.

If you want to make sure that your compiled version of Wt does not cause your application to depend on Boost, you'll have to build Wt with BOOST_DYNAMIC set to OFF, and SHARED_LIBS set to ON.

RE: Can't link on windows without boost compiled libraries - Added by Tibor Peak almost 5 years ago

Thanks a lot, Roel,

I tried it and my Wt application compiles without the boost libs now.

My app seems to be working as usual, but during compilation I receive lots of warnings like this:

warning C4251: 'Wt::WApplication::idleTimeout_': class 'Wt::JSignal<>' needs to have dll-interface to be used by clients of class 'Wt::WApplication'

Should I change something in my app when using Wt dll-s(I have never used Wt dlls before)?

    (1-2/2)