-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest code generates following linker errors in my project #166
Comments
Hi
What version of the compiler are you using?
Are you using EWDK?
Let me investigate this and get back to you later today.
…On Wed, Jun 9, 2021, 7:52 AM alkovacs ***@***.***> wrote:
I pulled the latest DMF code and now I am getting the following linker
errors in my driver project...
1>user_code.obj : error LNK2019: unresolved external symbol
_invalid_parameter_noinfo referenced in function memcpy_s
1>user_code.obj : error LNK2019: unresolved external symbol _errno
referenced in function memcpy_s
1>DmfK.lib(DmfUtility.obj) : error LNK2019: unresolved external symbol
__stdio_common_vswprintf referenced in function _vsnwprintf_l
1>DmfK.lib(DmfCore.obj) : error LNK2019: unresolved external symbol
__stdio_common_vsprintf referenced in function _vsnprintf_l
1>DmfK.lib(Dmf_CrashDump.obj) : error LNK2019: unresolved external symbol
__stdio_common_vsprintf_s referenced in function _vsprintf_s_l
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#166>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHY5IWW5S3DJYFNW2GLTADLTR55ZNANCNFSM46MGOP4Q>
.
|
Microsoft Visual Studio Professional 2019 Installed Version: Professional |
Hi, so... There have been issues reported with 16.10. The issues I found are different than what you found above. However, it is possible that you have run in to a similar issue. The issue that I have found has just been fixed yesterday and release was issued here: https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes You can see June 8 release for 16.10.1. Can I trouble you to install that version of Visual Studio and see if it corrects your issue? This is the issue I found that has been corrected: I have just built all DMF, DmtTest and DmfSamples without any problem (using 16.9). If you still have a problem, let me know. You can also send me email at: [email protected] Thank you for your report and your patience. |
So I think I see what's going on, I updated to 2019 V16.0.1 as you suggested, tried the builds (DMF Debug and My Project Debug) again and my project build failed. I was using the 10.0.20344.0 SDK/DDK . Switched that to 10.0.19041.0 SDK/DDK and my project build failed with, not the same but similar errors. Switched to the 10.0.17763.0 SDK/DDK and everything seems to compile/link fine. BUT, I went back to the 10.0.20344.0 SDK/DDK and the 10.0.19041.0 SDK/DDK, in both cases my project build fails. Then upon switching back to the 0.0.17763.0 SDK/DDK , my project build fails again with just 2 errors (linker) like __stdio_common_vsprintf referenced in function _vsnprintf_l .... Seems something is not being cleaned out in the settings ??? |
Are you using the SDK/DDK or the EWDK? We always use EWDK here. We open the EWDK command using command line as Administrator. Then, run LaunchBuildEnv.cmd. Then, switch to BuildEnv and run: setdevenv Then, we run VisualStudio from that command line...using a shortcut: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe" I have not used standard SDK/DDK in years. The EWDK has worked very well. Can you try that? It looks to me like you are running into some kind of SDK/DDK issue. I think you will be happier with EWDK. One nice thing about it is that you can easily have multiple versions of EWDK installed and then you can start VS in any version you want. You can get EWDK here: https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk Look at the middle of page for: "EWDK with Visual Studio Build Tools" It has instructions there too...but you can do what I did above. I agree there seems to be some kind of clean up error using SDK/DDK. I don't think it is a DMF issue...it is just some issue that has started happening by coincidence and possibly related to 16.10.0 compiler...or 16.10.x compiler. Let me know what you find...Again, sorry you are having this issue... I know these kinds of issues are not pleasant. |
So after installing the EWDK and following the instructions at the installation link, using VS 2019 16.0.1 , we were able to build the DMF (Debug) and our Project (Debug) in SDK/DDK version 10.0.19041.0 which is what was in the |
Right, there is only a single SDK/DDK in the EWDK. That is why it works so
well.
But there are multiple EWDK packages. You just open the command line in the
directory where the package resides (it can be mounted as CD if you want).
I am not sure if the older EWDK packages are still available. Let me look
and get back to you.
…On Thu, Jun 10, 2021, 12:09 PM alkovacs ***@***.***> wrote:
So after installing the EWDK and following the instructions at the
installation link, using VS 2019 16.0.1 , we were able to build the DMF
(Debug) and our Project (Debug) in SDK/DDK version 10.0.19041.0 which is
what was in the
Download the EWDK for Windows 10, version 2004 <http://url> . Funny now
my post driver build analysis tool no longer runs. So there is ONLY 1
SDK/WDK version available in an EWDK? I did see ddk's for win 7 and 8 , but
none of the newer ones, other than 10.0.19041.0. Is it possible to have
multiple under on EWDK install?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#166 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHY5IWQBNTQN6FK422BYNDDTSEEVTANCNFSM46MGOP4Q>
.
|
One more note...one nice thing about EWDK is you don't need to "install" it. You just copy the .iso onto your hard drive and mount it. Or, you can extract the .ISO onto a directory of your hard drive. This way you can multiple EWDK version and you KNOW that no version interferes with any other version. Once I used EWDK for driver programming, I never looked back. It is just a better way. Here is where you can get older versions of the EWDK: https://docs.microsoft.com/en-us/windows-hardware/drivers/other-wdk-downloads But you want a NEWER version that contains a newer DDK/SDK, correct? I do not know when that will be released. I can try to investigate that but it may take some time. |
Some other information about EWDK: https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/using-the-enterprise-wdk |
Sam, thank you for all of your help in what turned out NOT to be an issue specifically with the DMF, but an environment issue... |
Thank you for your patience and for reporting the issue. |
Just to add here, I was facing same issue in my driver project. Without making any changes to the SDK and WDK, downgrading from 16.10.1 VS'19 to 16.9.6 helped solve the issue and build was successful. |
Hi, soubhikSM, Do you mean you downgraded from 16.10.1 to 16.9.6? Or from 16.10.0? 16.10.1 is what corrects some known issues (ones I reported), but I am not sure if other issues exist. |
Hey samtertzakian , yes I downgraded from 16.10.1 to 16.9.6. I and a couple of my other teammates faced this same issue with 16.10.1. filename.obj : error LNK2019: unresolved external symbol _invalid_parameter_noinfo referenced in function memcpy_s I went through the comments here and finally after having tried lot of other stuff, installing enterprise version 16.9.6 resolved the issue. I did not need to install EWDK. |
Hi, soubhikSM, I left feedback to Visual Studio via the link in upper right corner. I will just send them the actual errors and see what they say. Sorry, there is not much else I can do directly. |
Hi I have just been informed that a fix for these above linker errors is in the Visual Studio Release pipeline. I don't know when it will be released or in which version. But for now, apparently the work-around is: Clear the "External Include Directories" field in the project settings. Or, just use 16.9.x until then. |
Thanks for the update samtertzakian. :) |
I pulled the latest DMF code and now I am getting the following linker errors in my driver project...
1>user_code.obj : error LNK2019: unresolved external symbol _invalid_parameter_noinfo referenced in function memcpy_s
1>user_code.obj : error LNK2019: unresolved external symbol _errno referenced in function memcpy_s
1>DmfK.lib(DmfUtility.obj) : error LNK2019: unresolved external symbol __stdio_common_vswprintf referenced in function _vsnwprintf_l
1>DmfK.lib(DmfCore.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf referenced in function _vsnprintf_l
1>DmfK.lib(Dmf_CrashDump.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf_s referenced in function _vsprintf_s_l
The text was updated successfully, but these errors were encountered: