Can't compile with Visual Studio 2022 using .lib Topic is solved
Re: Can't compile with Visual Studio 2022 using .lib
doublemax,
Then there would be no crashes if I link statically to the 3rd party libraries.
However, if I do and there is an installed dynamic library of such there will be crashes, especially on *nix with png/jpeg/tiff libraries. Especially if they are not API/ABI compatible.
I don't know how different linker is between MS and *nix, but we are talking the same pattern here.
And the seurity is a good enough reason to do nstatically linking. How often do you or anyone else from Development Community checks MS sites for Security updates and then rebuilds their software because the vulnerability was found and fixed?
Thank you.
Then there would be no crashes if I link statically to the 3rd party libraries.
However, if I do and there is an installed dynamic library of such there will be crashes, especially on *nix with png/jpeg/tiff libraries. Especially if they are not API/ABI compatible.
I don't know how different linker is between MS and *nix, but we are talking the same pattern here.
And the seurity is a good enough reason to do nstatically linking. How often do you or anyone else from Development Community checks MS sites for Security updates and then rebuilds their software because the vulnerability was found and fixed?
Thank you.
Re: Can't compile with Visual Studio 2022 using .lib
Inside one application you can't mix static and dynamic. But an exe with statically linked CRTs won't affect any other app.
Use the source, Luke!
Re: Can't compile with Visual Studio 2022 using .lib
doublemax,
I'm not talking bout mixing it in one application.
In the past people tried to link statically to wx, which of course brought the static linking to a png/tiff/jpeg library.
However, if the target system had a dynamic png/tiff/jpeg library which were not API/ABI compatible the software was experienced intermittent crashes.
Granted - that ws on *nix and I don't know how different *nix linker is from Windows, but the idea of statically linked somethong that could already be onm the target system and be API/ABI incompatible - worries me very much.
Thank you.
I'm not talking bout mixing it in one application.
In the past people tried to link statically to wx, which of course brought the static linking to a png/tiff/jpeg library.
However, if the target system had a dynamic png/tiff/jpeg library which were not API/ABI compatible the software was experienced intermittent crashes.
Granted - that ws on *nix and I don't know how different *nix linker is from Windows, but the idea of statically linked somethong that could already be onm the target system and be API/ABI incompatible - worries me very much.
Thank you.
Re: Can't compile with Visual Studio 2022 using .lib
I know the situation is different under Linux, but i still find that hard to believe. Sounds more like the user made a mistake and overwrote the system libs somehow.
Use the source, Luke!
Re: Can't compile with Visual Studio 2022 using .lib
doublemax,
JUst check the forum.
You will find couple of posts about that issue in the past.
I don't know if the situation improved now - I never build statically under Linux at all.
Thank you.
JUst check the forum.
You will find couple of posts about that issue in the past.
I don't know if the situation improved now - I never build statically under Linux at all.
Thank you.
Re: Can't compile with Visual Studio 2022 using .lib
Hi DoubleMax,
I've been having a similar problem with using static libraries. I am trying to link the CRTs statically by highlighting all the files ->right clicking ->properties, but for some reason it doesn't show me the "C++" dropdown? When I'm working in my actual project it does give me that dropdown. Do you know any workarounds for this?
Thanks
I've been having a similar problem with using static libraries. I am trying to link the CRTs statically by highlighting all the files ->right clicking ->properties, but for some reason it doesn't show me the "C++" dropdown? When I'm working in my actual project it does give me that dropdown. Do you know any workarounds for this?
Thanks
Re: Can't compile with Visual Studio 2022 using .lib
That happens when not all items you have selected, have that property. You probably selected "_custom_build", too. Select only from "adv" to "xrc".newguy111 wrote: ↑Wed Aug 10, 2022 5:30 pm I've been having a similar problem with using static libraries. I am trying to link the CRTs statically by highlighting all the files ->right clicking ->properties, but for some reason it doesn't show me the "C++" dropdown? When I'm working in my actual project it does give me that dropdown. Do you know any workarounds for this?
Use the source, Luke!
Re: Can't compile with Visual Studio 2022 using .lib
You're a legend! That was exactly the problem.
Question - would you be willing to offer advice on a related issue? I'm trying to make my program compile into a standalone .exe. However, I've got another library called cpr which relies on another library called libcurl. I built cpr with vcpkg and included "-static" in the command hoping that would make everything static. However, when I moved the full project's .exe to a random directory to test, I got a message saying "libcurl.dll" was missing.
I know it's not wxWidgets related, so understand if you don't feel like helping. If you do though I'd be glad to provide any details you need.
Thanks again for the help!
Question - would you be willing to offer advice on a related issue? I'm trying to make my program compile into a standalone .exe. However, I've got another library called cpr which relies on another library called libcurl. I built cpr with vcpkg and included "-static" in the command hoping that would make everything static. However, when I moved the full project's .exe to a random directory to test, I got a message saying "libcurl.dll" was missing.
I know it's not wxWidgets related, so understand if you don't feel like helping. If you do though I'd be glad to provide any details you need.
Thanks again for the help!
Re: Can't compile with Visual Studio 2022 using .lib
Hi,
What verion of wxWidgets you are working with? What libcurl version you library depends on?
There might be a conflict between wxWidgets libcurl and cpr libcurl...
So you need to be very careful when building/testing the whole product.
Thank you.
What verion of wxWidgets you are working with? What libcurl version you library depends on?
There might be a conflict between wxWidgets libcurl and cpr libcurl...
So you need to be very careful when building/testing the whole product.
Thank you.
Re: Can't compile with Visual Studio 2022 using .lib
Which libcurl version are you using? Last time i updated my libcurl, i couldn't find any fitting prebuilt binary and ended up building libcurl from the curl sources myself (which is not too hard).newguy111 wrote: ↑Wed Aug 10, 2022 9:51 pm I'm trying to make my program compile into a standalone .exe. However, I've got another library called cpr which relies on another library called libcurl. I built cpr with vcpkg and included "-static" in the command hoping that would make everything static. However, when I moved the full project's .exe to a random directory to test, I got a message saying "libcurl.dll" was missing.
Use the source, Luke!
Re: Can't compile with Visual Studio 2022 using .lib
I went into the version cpr is using and it says: 7.80.0-Dev.
For the version wxWidgets is using, do you have any ideas on how to find that? I opened up wxWidgets in File Explorer and tried searching "libcurl", also tried poking around in various folders for it, to no avail.
Thank you both for your willingness to help!
For the version wxWidgets is using, do you have any ideas on how to find that? I opened up wxWidgets in File Explorer and tried searching "libcurl", also tried poking around in various folders for it, to no avail.
Thank you both for your willingness to help!
Re: Can't compile with Visual Studio 2022 using .lib
AFAIK wxWidgets does not include libcurl.
Use the source, Luke!
Re: Can't compile with Visual Studio 2022 using .lib
doublemax,
I believe wxWeb* classes needs cURL and it is being pulled as submodule.
Thank you.
I believe wxWeb* classes needs cURL and it is being pulled as submodule.
Thank you.
Re: Can't compile with Visual Studio 2022 using .lib
AFAIK, wxWidgets uses libCURL only on Linux (for wxWebRequest), as can be seen e.g. in CMake files.
-
- Super wx Problem Solver
- Posts: 469
- Joined: Tue Jun 20, 2006 6:47 pm
- Contact:
Re: Can't compile with Visual Studio 2022 using .lib
Yes. on windows, wxWebrequest uses schannel (windows' internal TLS library). If you build with CMake, you have the option to use your own curl instead.
Unless you have a very good reason for doing so, I wouldn't do that.
Unless you have a very good reason for doing so, I wouldn't do that.