Skip to content
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

Error while building debug DlibDotNet.Native.Dnn on Windows 10 #261

Open
KinyaIwamoto opened this issue Aug 31, 2021 · 3 comments
Open

Error while building debug DlibDotNet.Native.Dnn on Windows 10 #261

KinyaIwamoto opened this issue Aug 31, 2021 · 3 comments

Comments

@KinyaIwamoto
Copy link

Summary of your issue

I was building "DlibDotNet.Native.Dnn" on the command line, referring to the web page "Tutorial for Windows". When I do a debug build, I get an error as shown below and the build stops.

net0.cpp
net1.cpp
net2.cpp
net3.cpp
net4.cpp
net5.cpp
output.cpp
adam.cpp
sgd.cpp
tensor.cpp
validation.cpp
D:\GitHub\DlibDotNet\src\DlibDotNet.Native.Dnn\dlib\dnn\loss\multiclass_log_per_pixel\defines\net4.cpp(2): error C2471: プログラム データベース 'D:\GitHub\DlibDotNet\src\DlibDotNet.Native.Dnn\build_win_desktop_cpu_x64\DlibDotNetNativeDnn.dir\Debug\vc141.pdb' を更新できません。 [D:\GitHub\DlibDotNet\src\DlibDotNet.Native.Dnn\build_win_desktop_cpu_x64\DlibDotNetNativeDnn.vcxproj]
D:\GitHub\DlibDotNet\src\DlibDotNet.Native.Dnn\dlib\dnn\loss\multiclass_log_per_pixel\defines\net2.cpp(2): error C2471: プログラム データベース 'D:\GitHub\DlibDotNet\src\DlibDotNet.Native.Dnn\build_win_desktop_cpu_x64\DlibDotNetNativeDnn.dir\Debug\vc141.pdb' を更新できません。 [D:\GitHub\DlibDotNet\src\DlibDotNet.Native.Dnn\build_win_desktop_cpu_x64\DlibDotNetNativeDnn.vcxproj]

The release build will be completed successfully.

Environment

Write your environment.

What did you do when you faced the problem?

I opened "DlibDotNetNativeDnn.sln" in "DlibDotNet.Native.Dnn\build_win_desktop_cpu_x64" using "Visual Studio2017 IDE" and did a rebuild. And I confirmed that I get the same error.
I checked the obj files in "DlibDotNet.Native.Dnn\build_win_desktop_cpu_x64\DlibDotNetNativeDnn.dir\Debug" and manually compiled the corresponding cpp files one by one for the obj files that had not been created.When "error C2471" occurred, I deleted "vc141.pdb" and then compiled again.After all the obj files were created, the build completed successfully, and the DLL and lib files were created.

Example code:

paste your core code

Output:

paste your output

What did you intend to be?

@takuya-takeuchi
Copy link
Owner

@KinyaIwamoto

It could be restriction of VisualStudio.
Debug build contains numerous code and pdb file should be huge size.
Basically, we can not build DlibDotNet.Native as debug.
However, we may be able to build after rid of unnecessary code; e.g. except for code you want to debug.net0.cpp

@takuya-takeuchi takuya-takeuchi self-assigned this Aug 31, 2021
@KinyaIwamoto
Copy link
Author

Thank you for your response.
Immediately after the error, the vc141.pdb file was 2.74GB.
Except for the debug build of "DlibDotNet.Native.Dnn", I was able to build using the Wiki method.
"DlibDotNet.Native.Dnn" was able to debug-build by specifying the "/ Z7" option and setting "Generate debug information" to "No" from the Visual Studio 2017 IDE.

@takuya-takeuchi
Copy link
Owner

thank you for your good information!!

"DlibDotNet.Native.Dnn" was able to debug-build by specifying the "/ Z7" option and setting "Generate debug information" to "No" from the Visual Studio 2017 IDE.

Ok, I will add option to CMakeLists.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants