I am trying to get Glew and opengl 3.2 working with blocks of code (minGW) in the context of win32. i found a nice little tutorial here
As I was trying to understand, if compiling glew in code blocks was really possible, I wanted to try the source before doing the tutorial to see if this would work.
after a slight improvement in the code, I tried to compile and got some errors that I had never seen before. they look like this
|In function 'bool createWindow(LPCWSTR, int, int)':| |73|error: cannot convert 'LPCWSTR {aka const wchar_t*}' to 'LPCSTR {aka const char*}' in assignment| |80|error: cannot convert 'LPCWSTR {aka const wchar_t*}' to 'LPCSTR {aka const char*}' for argument '2' to 'HWND__* CreateWindowExA(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID)'| |In function 'int WinMain(HINSTANCE, HINSTANCE, LPSTR, int)':| |105|warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]| |110|error: '_TRUNCATE' was not declared in this scope| |110|error: 'mbstowcs_s' was not declared in this scope|
My code
include <iostream>
(Sorry for the text wall) there are other files, but all the errors seem to get from here. bad post if necessary.
I really did not see any errors like this, so I did some search queries and found out that the error was caused because the compiler is not configured for multibyte (parameter in VS2010). I looked around a bit and could not find such settings in the code blocks. Is this code used only in VS or am I missing something? I was worried that this could be due to my connection due to the fact that I had a lot of problems with this in the past. Any help would be appreciated.
source share