Repository navigation
Conversation
Link against Iphlpapi on Windows. This is needed for `if_nametoindex` which is now used on Windows.
|
This certainly proves we should have at least one winbuild done in the appveyor CI! |
|
What about all the Visual Studio project files and cmake builds? We might want to consider the following instead, in curl-win32.h, as we can conditionally include the library then: |
The current appveyor builds are all done with cmake so we can be fairly sure they work... But yeah, Visual Studio project file builds would be good to verify as well! Is that doable from command line? Now if only appveyor.yml wasn't such a weird yaml format! 😿 But I suppose with enough number of tries we should be able to get something going...
I'll defer to your (plural) windows knowledge on what the best take on this is. |
Yes, msbuild can be used directly. I can look into adding VS project file and winbuild jobs on the weekend. I only hope the yaml file won't get too complex when adding other build systems. |
|
What are peoples' thoughts on using #pragma comment? I've never used #pragma for this specifically but then I haven't needed to conditionally include lib files before. The drawback to me of hard coding a library in a project, makefile, etc... means the build will break if it is compiled on a system that doesn't have that library, and there is no condition for including it. So whilst we are trying to detect that the Iphlpapi header files exists I would try and avoid hardcoding a library in the project files for example, unless someone knows a way to do this conditionally? |
I've used it and I like it. However, I don't know if all compilers supported by config-win32.h support |
That is correct. But what about: X = Curl_load_library(TEXT("iphlpapi.dll"));
...
Y = GetProcAddress(X, "if_nametoindex")));
... |
|
I know that |
|
Whatever solution, it'd be great to have a working fix landed like no later than Monday 27th so that we can have a patch release release (7.65.1) including this fix done on May 29th. We can always polish and improve the fix after that release as well. |
|
Is there any compiler except MSVC and clang that can be used with the Visual Studio project files or Winbuild? If not, I'd lean towards the pragma in an #ifdef for these two compilers. |
|
@MarcelRaad #3943 should adjust the Visual Studio projects for the iphlpapi dependency. For the Visual Studio projects, I think that |
|
I know I suggested the #pragma but I would lean towards dynamically loading the library as we do for ws2_32.dll and secur32.dll rather than introduce another mechanism. Alternatively we could move away from dynamically loading libraries? |
|
@captain-caveman2k - hmm, the CMake and VS projects (as well as nmake) seem to indicate that they are just linked against the library rather than dynamically loaded at runtime? |
|
I think that we can close this now that curl is using the dynamic lookup. |
Link against Iphlpapi on Windows. This is needed for
if_nametoindexwhich is now used on Windows.