Cannot link Qt libs to C++ project manually.
-
@SGaist It's really interesting, so let's make it clear.
I build the next codeboost::asio::io_context io; boost::asio::steady_timer t(io, boost::asio::chrono::seconds(5)); std::cout << "Hey "; t.wait(); std::cout << "lala ley ";
And without next command
/link /LIBPATH:C:\Program Files (x86)\Boost\boost_1_76_0\stage\lib
I get linker error (no date-time library and so on - it's separately-compiled).
And, of course, adding this command, I have the program built successfully. So, as you can see I have no need to link exact .lib file excplicitly.@Sirzhatina said in Cannot link Qt libs to C++ project manually.:
So, as you can see I have no need to link exact .lib file excplicitly.
We already explained why this works... but Qt does fortunately not support this.
-
@Sirzhatina said in Cannot link Qt libs to C++ project manually.:
So, as you can see I have no need to link exact .lib file excplicitly.
We already explained why this works... but Qt does fortunately not support this.
@Christian-Ehrlicher okay, thanks. But you said that's what msvc does. And I still use msvc to compile Qt libs, so what's the mystery here? I mean why does msvc auto-link one libraries and not auto-link others
-
@Christian-Ehrlicher okay, thanks. But you said that's what msvc does. And I still use msvc to compile Qt libs, so what's the mystery here? I mean why does msvc auto-link one libraries and not auto-link others
@Sirzhatina said in Cannot link Qt libs to C++ project manually.:
I mean why does msvc auto-link one libraries and not auto-link others
see the answer from @hskoglund - this is basically what the boost libs are doing and Qt not (because it's crappy, error-prone and non-portable)