|
Hello, I try to use this class as a static library but there is a lot of unsolved warnings. Can you help me what I do bad? Because there is no error in your samle code.
Thanks. xSoptik
------ Build started: Project: clReportCtrl, Configuration: Debug Win32 ------
Deleting intermediate files and output files for project 'clReportCtrl', configuration 'Debug|Win32'.
Compiling...
stdafx.cpp
WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
Compiling...
ReportOptionsCtrl.cpp
d:\DevCom\Projects\lib\clReportCtrl\ReportOptionsCtrl.cpp(433) : warning C4311: 'type cast' : pointer truncation from 'CRuntimeClass *' to 'DWORD'
d:\DevCom\Projects\lib\clReportCtrl\ReportOptionsCtrl.cpp(451) : warning C4311: 'type cast' : pointer truncation from 'CRuntimeClass *' to 'DWORD'
d:\DevCom\Projects\lib\clReportCtrl\ReportOptionsCtrl.cpp(500) : warning C4312: 'type cast' : conversion from 'DWORD' to 'CRuntimeClass *' of greater size
d:\DevCom\Projects\lib\clReportCtrl\ReportOptionsCtrl.cpp(754) : warning C4244: '=' : conversion from 'LRESULT' to 'BOOL', possible loss of data
ReportCtrl.cpp
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(446) : warning C4267: '=' : conversion from 'size_t' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(902) : warning C4244: 'return' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1060) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1090) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1111) : warning C4244: 'return' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1116) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1367) : warning C4267: 'return' : conversion from 'size_t' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1434) : warning C4244: 'return' : conversion from 'LPARAM' to 'DWORD', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1537) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1602) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1612) : warning C4244: '=' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1723) : warning C4244: 'return' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1844) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1882) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(1898) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2061) : warning C4312: 'type cast' : conversion from 'UINT' to 'LPCTSTR' of greater size
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2243) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2244) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2351) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2373) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2388) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2407) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2450) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2465) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2484) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2490) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2494) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2597) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2642) : warning C4244: '=' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2862) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'int', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2950) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(2977) : warning C4244: '=' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3101) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3267) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3432) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3566) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3644) : warning C4244: '=' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3700) : warning C4244: 'return' : conversion from 'LRESULT' to 'BOOL', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3866) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3900) : warning C4311: 'type cast' : pointer truncation from 'CReportCtrl::LPTREEITEM' to 'ULONG'
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3986) : warning C4244: 'argument' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(3998) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4048) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4070) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4139) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4249) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4276) : warning C4244: 'return' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4291) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4334) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(4942) : warning C4244: '=' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(5008) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(5246) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(5298) : warning C4244: '=' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(6749) : warning C4244: '=' : conversion from '__w64 int' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7097) : warning C4244: 'argument' : conversion from 'LPARAM' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7125) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7282) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'int', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7295) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7334) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7432) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7478) : warning C4244: 'argument' : conversion from 'ULONG_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7537) : warning C4244: '=' : conversion from 'DWORD_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7580) : warning C4244: '=' : conversion from 'LRESULT' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7842) : warning C4244: '=' : conversion from 'WPARAM' to 'UINT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(7948) : warning C4244: '=' : conversion from 'WPARAM' to 'UINT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8047) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8334) : warning C4244: 'initializing' : conversion from 'LRESULT' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8532) : warning C4244: 'initializing' : conversion from 'ULONG_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8550) : warning C4244: 'initializing' : conversion from 'ULONG_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8610) : warning C4312: 'type cast' : conversion from 'INT' to 'LPCTSTR' of greater size
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(8650) : warning C4244: 'argument' : conversion from 'WPARAM' to 'INT', possible loss of data
FlatHeaderCtrl.cpp
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1118) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1124) : warning C4244: '=' : conversion from 'LRESULT' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1212) : warning C4244: 'initializing' : conversion from 'LRESULT' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1378) : warning C4244: '=' : conversion from 'LRESULT' to 'INT', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1394) : warning C4244: 'argument' : conversion from '__w64 int' to 'int', possible loss of data
d:\DevCom\Projects\lib\clReportCtrl\FlatHeaderCtrl.cpp(1706) : warning C4244: 'initializing' : conversion from 'LRESULT' to 'INT', possible loss of data
Generating Code...
Creating library...
Build log was saved at "file://d:\DevCom\Projects\lib\clReportCtrl\Debug\BuildLog.htm"
clReportCtrl - 0 error(s), 81 warning(s)
---------------------- Done ----------------------
Build: 1 succeeded, 0 failed, 0 skipped
|
|
|
|
|
NOt too sure it is related to static library.
It seems to me that the errors are caused by conversion from 64 bits to 32 bits
example:
d:\DevCom\Projects\lib\clReportCtrl\ReportCtrl.cpp(6749) : warning C4244: '=' : conversion from '__w64 int' to 'INT', possible loss of data
it is trying to store a 64 bits integer into an INT so the INT is probably 32 bits.
May be the best thing to do is to change every INT into LONG
Maybe just do it where you have warning...
Good luck
Andre
|
|
|
|