-
Notifications
You must be signed in to change notification settings - Fork 136
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
VS2012 Spout2 compile error #5
Comments
from memory you need to change your project to use multi code, either that or to not use multicode |
Yes I came across this recently with another project and fixed it by casting. For this particular project it was due to to the "Configuration properties -> character set" not being set to anything. Other Spout projects are set to Unicode. In this project the rest of the code causes errors for Unicode so it has to be left not set, but your project might work OK with Unicode. For some reason wcstombs_s does not like "DisplayDevice.DeviceKey" which is WCHAR but it works OK with "adapterinfo.Description" which is also WCHAR. In fact for your project you could try to leave out the "GetAdapterInfo" function. I am working on a release that removes the auto-detection of Intel graphics because this does not seem to work as expected and is causing problems. The new release will have an installer with options for DirectX 9 or DirectX 11. Then in "OpenDirectX" make the following change :
After that you should specifically set to use DirectX 9 or DirectX 11 with SetDX9() because DirectX 9 will be the default for the next release. At the moment the default is DirectX 11. Everything except the Unity plugin should work with DirectX9. |
Thx guys! |
Changes implemented for 2.005 |
Hi
When compiling Spout on VS2012 I get this error:
"1>..\SpoutGLDXinterop.cpp(433): error C2664: 'errno_t wcstombs_s(size_t *,char *,size_t,const wchar_t *,size_t)' : cannot convert parameter 4 from 'CHAR [128]' to 'const wchar_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast"
Can be solved with
MultiByteToWideChar(CP_ACP, 0, p, -1, (LPWSTR)pwcsName, nChars);
;
(But don't know if it is because a bad conversion to 2012 or not.
The text was updated successfully, but these errors were encountered: