Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, April 27, 2016 7:24 PM
I am using Visual Studio 2015 Professional and I have created a new project in C language that uses SDL library both for x86 and x64 versions. Indeed I have already downloaded SDL library for Visual C, and I have succeeded to #include all headers and link the libraries both for x86 and x64 versions in the project properties of Visual Studio.
Of course that I also downloaded the SDL.dll both for x86 and x64 versions, and the x86 I placed in C:\Windows\System32 and the x64 I placed in C:\Windows\SysWow64. I have built and run my program using Local Windows Debugger both x86 and x64 versions and I got the following error as MessageBox:
Title: "exe name - Application Error"
Text: "The application was unable to start correctly (0xc000007b). Click OK to close the application."
But when I place the x86 SDL.dll next to my x86 program.exe, then it runs without any error,
and when I place the x64 SDL.dll next to my x64 program.exe, then it also runs without any error.
But I don't want the SDL dlls to be there, but x86 in the System32 folder and x64 in the SysWow64 folder, because I want in the future to create more projects that use the SDL library, and I don't want to copy the dlls for each exe file.
I know that I need to do something with the project properties to target the dlls in the System32 and SysWow64 folders, but I don't know what exactly. I need your help and you to tell me, so please tell me and help me.
All replies (11)
Thursday, April 28, 2016 10:52 AM ✅Answered
... and the x86 I placed in C:\Windows\System32 and the x64 I placed in C:\Windows\SysWow64.
Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on 64-bit Windows?
With kind regards
Thursday, April 28, 2016 3:54 PM ✅Answered
... and the x86 I placed in C:\Windows\System32 and the x64 I placed in C:\Windows\SysWow64.
Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on 64-bit Windows?
With kind regards
Check the link ExpertProgrammer. Your understanding is backwards.
A
I don't mind someone marking a post as "Proposed as answer", but DO NOT mark it as "Answered". If I am the OP, I will decide if a post actually answers my post or not. Thank you.
Wednesday, April 27, 2016 6:18 PM
I am using Visual Studio 2015 Professional and I have created a new project in C language that uses SDL library both for x86 and x64 versions. Indeed I have already downloaded SDL library for Visual C, and I have succeeded to #include all headers and link the libraries both for x86 and x64 versions in the project properties of Visual Studio.
Of course that I also downloaded the SDL.dll both for x86 and x64 versions, and the x86 I placed in C:\Windows\System32 and the x64 I placed in C:\Windows\SysWow64. I have built and run my program using Local Windows Debugger both x86 and x64 versions and I got the following error as MessageBox:
Title: "exe name - Application Error"
Text: "The application was unable to start correctly (0xc000007b). Click OK to close the application."
But when I place the x86 SDL.dll next to my x86 program.exe, then it runs without any error,
and when I place the x64 SDL.dll next to my x64 program.exe, then it also runs without any error.
But I don't want the SDL dlls to be there, but x86 in the System32 folder and x64 in the SysWow64 folder, because I want in the future to create more projects that use the SDL library, and I don't want to copy the dlls for each exe file.
I know that I need to do something with the project properties to target the dlls in the System32 and SysWow64 folders, but I don't know what exactly. I need your help and you to tell me, so please tell me and help me.
Wednesday, April 27, 2016 7:44 PM | 1 vote
This question is a duplicate of this.
Moreover, you deleted the thread from yesterday when you asked the very same question. Was it not answered the first time?
Regardless, you should try to refrain from multiposting. It is considered bad netiquette.
Wednesday, April 27, 2016 8:58 PM
Please carefully read and follow the information at the link below. 8)
If you say it can`t be done then i`ll try it
Wednesday, April 27, 2016 9:14 PM
Thanks for your replies, I accidently posted in the Office Dev Center, when I had to post it here in the Microsoft Developer Net
Wednesday, April 27, 2016 9:15 PM
My duplicate and deleted questions have not been answered for the first time
Thursday, April 28, 2016 5:51 AM
Hi ExpertProgrammer,
Do you have tried the steps in the link IronRazerz provided?
In Visual Studio, we often assign the dll path for every C++ project through Project Properties -> VC++ Directories -> Include Directories.
If misunderstanding, please feel free to let me know.
Best Regards,
Weiwei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
Thursday, April 28, 2016 10:10 AM
I don't have problem with the include directories, I have already succeeded to include SDL headers, but the problem is with the DLL files. Only if I put the SDL.dll files in the directory, where the exe files are located, then they run without error, but I want my DLL files in C:\Windows\System32 and C:\Windows\SysWow64, but when they are there, it runs with error and then stops.
What's the difference between Office Dev Center and Microsoft Developer Net?
MSDN site started to confuse me. My apologize that I duplicated my question, I just thought that the previous I posted in a wrong place.
Thursday, April 28, 2016 1:16 PM
The opposite of what you understood is true.
x86 is 32 bit, and x64 is 64 bit.
I placed the x86 (32 bit) in System32, and I placed the x64 (64 bit) in SysWoW64.
There is nothing wrong with this, how from this quote, you understood the opposite?
Anyway, I read that I should use regsvr32.exe to register the SDL dlls, so my application will recognize them and load them, but when I did it, my computer suddenly became extremely slow and not responsive.
When I barely succeed to open the task manager, I saw that 3800 processes were running in my computer and my memory usage was 3.8 out of 4 GB (95% physical memory) in the Performance.
And in the process list tab, I saw that thousands of regsvr32.exe were running and I had to terminate them all one by one for hours!!!
WTF!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!??????????????????????
If nobody gonna help me with this, then please ban me from MSDN forever.
Believe me, I willl prefer to commit suicide now and that's it!
I hate my life so much!!!
I don't know for what I am living for!
Thursday, April 28, 2016 4:39 PM
Do you say that x86 is 64 bit and x64 is 32 bit!?
Oh my god! This is so weird that x86 should go to SysWoW64 and x64 should go to System32! I have already placed many x86 dlls in System32 and many x64 dlls in SysWoW64!
What should I do now?
EDIT: Okay I have done the drudgery work, I have moved the x86 to SysWoW64 and the x64 to System32, and now it compiles and there are no errors!
So weird, but thank you very much!