Page 1 of 1

LNK2038 errors while running example code

Posted: Thu May 13, 2021 11:25 am
by sreejan
I have been trying to run the predefined examples. I had configured and Generated the project in CMake, which is successful.. But in Visual studio.. After running the checkenvironment.cpp is generating a list of LNK2038 errors
Screenshot (35).png
Screenshot (35).png (297.35 KiB) Viewed 296 times
. Can anyone help me with this?

Re: LNK2038 errors while running example code

Posted: Thu May 13, 2021 12:13 pm
by aymanh
Hello,

You're linking debug build against release libraries. This is not supported by the windows platform. Switch to Release or Relwithdebinfo in drop down for configuration and retry.

Best regards,
Ayman

Re: LNK2038 errors while running example code

Posted: Thu May 13, 2021 10:14 pm
by sreejan
Thanks,
That worked.. it doesn't generate errors anymore. But, it says it is unable to start program and Access is denied.
Screenshot (36).png
Screenshot (36).png (257.64 KiB) Viewed 205 times

Re: LNK2038 errors while running example code

Posted: Sat May 15, 2021 1:34 am
by sreejan
I was able to solve that too.
I have done two things...
a) I have provided full access for all users to the files that are in my OneDrive.
b) I have set the test environment as startup project.
Screenshot (37).png
Screenshot (37).png (250.9 KiB) Viewed 184 times