GreycLab/CImg

CImg.h not work in Universal Windwos Platform (uwp).

Closed this issue · 2 comments

I'm trying to make a universal windows platform project using CImg but, Once I include the CImg.h and build generate this output.

1>------ Rebuild All started: Project: WindowsRuntimeComponent1, Configuration: Debug Win32 ------
1> pch.cpp
1> Class1.cpp
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4048): error C2065: 'PROCESS_INFORMATION': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4048): error C2146: syntax error: missing ';' before identifier 'pi'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4048): error C2065: 'pi': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4049): error C2065: 'STARTUPINFO': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4049): error C2146: syntax error: missing ';' before identifier 'si'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4049): error C2065: 'si': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4050): error C2065: 'pi': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4050): error C2065: 'PROCESS_INFORMATION': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4051): error C2065: 'si': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4051): error C2065: 'STARTUPINFO': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4052): error C2065: 'si': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4052): error C3861: 'GetStartupInfo': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4053): error C2065: 'si': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4053): error C2228: left of '.cb' must have class/struct/union
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4053): note: type is 'unknown-type'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4054): error C2065: 'si': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4054): error C2228: left of '.wShowWindow' must have class/struct/union
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4054): note: type is 'unknown-type'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4055): error C2065: 'si': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4055): error C2228: left of '.dwFlags' must have class/struct/union
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4055): note: type is 'unknown-type'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4055): error C2065: 'STARTF_USESHOWWINDOW': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4056): error C2065: 'si': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4056): error C2065: 'pi': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4056): error C3861: 'CreateProcess': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4058): error C2065: 'pi': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4058): error C2228: left of '.hProcess' must have class/struct/union
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4058): note: type is 'unknown-type'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4059): error C2065: 'pi': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4059): error C2228: left of '.hThread' must have class/struct/union
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4059): note: type is 'unknown-type'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4060): error C2065: 'pi': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4060): error C2228: left of '.hProcess' must have class/struct/union
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4060): note: type is 'unknown-type'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4062): error C2039: 'system': is not a member of 'std'
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\ctime(17): note: see declaration of 'std'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4313): error C3861: '_getpid': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4811): error C3861: 'GetShortPathNameA': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4871): error C3861: 'GetFileAttributesA': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(4900): error C3861: 'CreateFileA': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8298): error C3646: '_ccs': unknown override specifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8298): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8308): error C2065: 'ENUM_CURRENT_SETTINGS': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8308): error C3861: 'EnumDisplaySettings': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8316): error C2065: 'ENUM_CURRENT_SETTINGS': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8316): error C3861: 'EnumDisplaySettings': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8328): error C3861: 'GetWindowLong': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8337): error C3861: 'ShowWindow': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8342): error C3861: 'PeekMessage': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8355): error C3861: 'PeekMessage': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8369): error C3861: 'ShowCursor': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8384): error C3861: 'PeekMessage': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8389): error C2065: 'TRACKMOUSEEVENT': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8389): error C2146: syntax error: missing ';' before identifier 'tme'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8389): error C2065: 'tme': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8390): error C2065: 'tme': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8390): error C2228: left of '.cbSize' must have class/struct/union
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8390): note: type is 'unknown-type'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8390): error C2065: 'TRACKMOUSEEVENT': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8391): error C2065: 'tme': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8391): error C2228: left of '.dwFlags' must have class/struct/union
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8391): note: type is 'unknown-type'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8392): error C2065: 'tme': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8392): error C2228: left of '.hwndTrack' must have class/struct/union
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8392): note: type is 'unknown-type'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8393): error C2065: 'tme': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8393): error C3861: 'TrackMouseEvent': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8401): error C3861: 'ShowCursor': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8408): error C3861: 'ShowCursor': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8439): error C3861: 'DefWindowProc': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8462): error C3861: 'AdjustWindowRect': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8466): error C2039: '_ccs': is not a member of 'cimg_library::CImgDisplay'
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(5639): note: see declaration of 'cimg_library::CImgDisplay'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8466): error C3861: 'CreateWindowExA': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8471): error C3861: 'GetWindowRect': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8479): error C2039: '_ccs': is not a member of 'cimg_library::CImgDisplay'
1> c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(5639): note: see declaration of 'cimg_library::CImgDisplay'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8479): error C3861: 'CreateWindowExA': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8486): error C3861: 'SetForegroundWindow': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8487): error C3861: 'GetDC': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8495): error C3861: 'SetWindowLong': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8496): error C3861: 'SetWindowLong': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8499): error C3861: 'GetMessage': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8499): error C3861: 'DispatchMessage': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8508): error C3861: 'AdjustWindowRect': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8512): error C3861: 'GetWindowRect': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8525): error C3861: 'EnumDisplaySettings': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8535): error C2065: 'ENUM_CURRENT_SETTINGS': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8535): error C3861: 'EnumDisplaySettings': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8536): error C3861: 'EnumDisplaySettings': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8537): error C3861: 'ChangeDisplaySettings': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8544): error C2065: 'CLIENTCREATESTRUCT': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8544): error C2146: syntax error: missing ';' before identifier 'background_ccs'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8544): error C2065: 'background_ccs': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8545): error C2065: 'background_ccs': undeclared identifier
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8545): error C3861: 'CreateWindowExA': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8546): error C3861: 'SetForegroundWindow': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8553): error C3861: 'DestroyWindow': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8555): error C3861: 'ChangeDisplaySettings': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8598): error C3861: 'DestroyWindow': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8599): error C3861: 'TerminateThread': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8671): error C3861: 'AdjustWindowRect': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8673): error C3861: 'SetWindowPos': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8715): error C3861: 'ShowWindow': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8724): error C3861: 'ShowWindow': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8735): error C3861: 'AdjustWindowRect': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8739): error C3861: 'SetWindowPos': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8740): error C3861: 'SetWindowPos': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8764): error C3861: 'SetCursorPos': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8781): error C3861: 'SetWindowTextA': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(8799): error C3861: 'SetDIBitsToDevice': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(51312): error C2039: 'getenv': is not a member of 'std'
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\ctime(17): note: see declaration of 'std'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(51312): error C3861: 'getenv': identifier not found
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(51313): error C2039: 'getenv': is not a member of 'std'
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\ctime(17): note: see declaration of 'std'
1>c:\users\leo03\documents\visual studio 2015\projects\windowsruntimecomponent1\windowsruntimecomponent1\cimg.h(51313): fatal error C1003: error count exceeds 100; stopping compilation
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Link with sample project with this error

https://onedrive.live.com/redir?resid=F5669F7C478D4DD9!2546&authkey=!AA28XZfHiq0eHqU&ithint=file%2czip

I don't know what UWP is. CImg uses system calls so maybe that's the issue for this kind of project ?
I doubt this can work anyway.

Dian8 commented

Looks like CImg requires <windows.h> on windows