vs compile warnings causing errors?

For code related discussions and questions
Post Reply
dskiller1
Rookie
Rookie
Posts: 20
Joined: 18 Sep 2016, 02:33

vs compile warnings causing errors?

Post by dskiller1 »

trying to compile cmd and visualstudio it self but run into build errors everytime.




warnings...

"F:\warzone2100\build\ALL_BUILD.vcxproj" (default target) (1) ->
"F:\warzone2100\build\lib\exceptionhandler\exception-handler.vcxproj" (default target) (5) ->
"F:\warzone2100\build\lib\framework\framework.vcxproj" (default target) (6) ->
(ClCompile target) ->
f:\warzone2100\lib\framework\crc.cpp(96): warning C4267: 'argument': conversion from 'size_t' to 'unsigned long', pos
sible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\crc.cpp(132): warning C4267: 'argument': conversion from 'size_t' to 'const unsigned int
', possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\crc.cpp(649): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', pos
sible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\crc.cpp(804): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int',
possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\frame.cpp(344): warning C4267: 'argument': conversion from 'size_t' to 'PHYSFS_uint32',
possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\lexer_input.cpp(36): warning C4267: 'return': conversion from 'size_t' to 'int', possibl
e loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\lexer_input.cpp(48): warning C4267: 'argument': conversion from 'size_t' to 'PHYSFS_uint
32', possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_lexer.cpp(873): warning C4267: '=': conversion from 'size_t' to 'int', po
ssible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_lexer.lpp(135): warning C4267: 'argument': conversion from 'size_t' to 'i
nt', possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_lexer.cpp(1196): warning C4267: 'initializing': conversion from 'size_t'
to 'int', possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_lexer.cpp(1209): warning C4267: 'initializing': conversion from 'size_t'
to 'int', possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_lexer.cpp(1231): warning C4267: '=': conversion from 'size_t' to 'int', p
ossible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_lexer.cpp(1666): warning C4267: '=': conversion from 'size_t' to 'int', p
ossible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_lexer.cpp(1704): warning C4267: '=': conversion from 'size_t' to 'int', p
ossible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_lexer.cpp(1726): warning C4267: 'argument': conversion from 'size_t' to '
int', possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_parser.ypp(104): warning C4267: '=': conversion from 'size_t' to 'UDWORD'
, possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\strres_lexer.cpp(863): warning C4267: '=': conversion from 'size_t' to 'int', poss
ible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\strres_lexer.lpp(132): warning C4267: 'argument': conversion from 'size_t' to 'int
', possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\strres_lexer.cpp(1167): warning C4267: 'initializing': conversion from 'size_t' to
'int', possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\strres_lexer.cpp(1180): warning C4267: 'initializing': conversion from 'size_t' to
'int', possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\strres_lexer.cpp(1202): warning C4267: '=': conversion from 'size_t' to 'int', pos
sible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\strres_lexer.cpp(1637): warning C4267: '=': conversion from 'size_t' to 'int', pos
sible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\strres_lexer.cpp(1675): warning C4267: '=': conversion from 'size_t' to 'int', pos
sible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\strres_lexer.cpp(1697): warning C4267: 'argument': conversion from 'size_t' to 'in
t', possible loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\wzconfig.cpp(38): warning C4267: 'argument': conversion from 'size_t' to 'UDWORD', possi
ble loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\wzconfig.cpp(445): warning C4267: 'return': conversion from 'size_t' to 'int', possible
loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\wzstring.cpp(73): warning C4267: '=': conversion from 'size_t' to 'int', possible loss o
f data [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\wzstring.cpp(93): warning C4267: 'argument': conversion from 'size_t' to 'int', possible
loss of data [F:\warzone2100\build\lib\framework\framework.vcxproj]


errors

"F:\warzone2100\build\ALL_BUILD.vcxproj" (default target) (1) ->
"F:\warzone2100\build\lib\exceptionhandler\exception-handler.vcxproj" (default target) (5) ->
"F:\warzone2100\build\lib\framework\framework.vcxproj" (default target) (6) ->
(ClCompile target) ->
f:\warzone2100\lib\framework\crc.cpp(96): error C2220: warning treated as error - no 'object' file generated [F:\warz
one2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\frame.cpp(344): error C2220: warning treated as error - no 'object' file generated [F:\w
arzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\lexer_input.cpp(36): error C2220: warning treated as error - no 'object' file generated
[F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_lexer.cpp(873): error C2220: warning treated as error - no 'object' file
generated [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\resource_parser.ypp(104): error C2220: warning treated as error - no 'object' file
generated [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\build\lib\framework\strres_lexer.cpp(863): error C2220: warning treated as error - no 'object' file ge
nerated [F:\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\wzconfig.cpp(38): error C2220: warning treated as error - no 'object' file generated [F:
\warzone2100\build\lib\framework\framework.vcxproj]
f:\warzone2100\lib\framework\wzstring.cpp(73): error C2220: warning treated as error - no 'object' file generated [F:
\warzone2100\build\lib\framework\framework.vcxproj]

28 Warning(s)
8 Error(s)
dskiller1
Rookie
Rookie
Posts: 20
Joined: 18 Sep 2016, 02:33

Re: vs compile warnings causing errors?

Post by dskiller1 »

cmake -H. -DCMAKE_TOOLCHAIN_FILE=F:\warzone2100\vcpkg\scripts\buildsystems\vcpkg.cmake -Bbuild -G "Visual Studio 15 2017 Win64"
-- The C compiler identification is MSVC 19.14.26433.0
-- The CXX compiler identification is MSVC 19.14.26433.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Miniupnpc (missing: MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY) (Required is at least version "9")
-- Using in-tree Miniupnpc
-- Performing Test LINK_FLAG_PIE_SUPPORTED
-- Performing Test LINK_FLAG_PIE_SUPPORTED - Success
-- Performing Test HAS_CFLAG_FSTACK_PROTECTOR_STRONG
-- Performing Test HAS_CFLAG_FSTACK_PROTECTOR_STRONG - Failed
-- Performing Test HAS_CFLAG_FSTACK_PROTECTOR
-- Performing Test HAS_CFLAG_FSTACK_PROTECTOR - Failed
-- Performing Test HAS_CXXFLAG_FSTACK_PROTECTOR_STRONG
-- Performing Test HAS_CXXFLAG_FSTACK_PROTECTOR_STRONG - Failed
-- Performing Test HAS_CXXFLAG_FSTACK_PROTECTOR
-- Performing Test HAS_CXXFLAG_FSTACK_PROTECTOR - Failed
-- Looking for include file alloca.h
-- Looking for include file alloca.h - not found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file strings.h
-- Looking for include file strings.h - not found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for include file sys/ucontext.h
-- Looking for include file sys/ucontext.h - not found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - not found
-- Looking for gettext
-- Looking for gettext - not found
-- Looking for iconv
-- Looking for iconv - not found
-- Looking for strlcat
-- Looking for strlcat - not found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for strlcat
-- Looking for strlcat - not found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for putenv
-- Looking for putenv - found
-- Looking for setenv
-- Looking for setenv - not found
-- WZ_BINDIR="bin"
-- WZ_LOCALEDIR="./locale"
-- Found PhysFS: F:/warzone2100/vcpkg/installed/x64-windows/debug/lib/physfs.lib
-- Found Intl: F:/warzone2100/vcpkg/installed/x64-windows/include
-- Found ZLIB: optimized;F:/warzone2100/vcpkg/installed/x64-windows/lib/zlib.lib;debug;F:/warzone2100/vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found version "1.2.11")
-- Found PNG: optimized;F:/warzone2100/vcpkg/installed/x64-windows/lib/libpng16.lib;debug;F:/warzone2100/vcpkg/installed/x64-windows/debug/lib/libpng16d.lib (found suitable version "1.6.35", minimum required is "1.2")
-- Found OpenGL: opengl32
-- Found GLEW: F:/warzone2100/vcpkg/installed/x64-windows/include (Required is at least version "1.5.2")
-- Found Freetype: optimized;F:/warzone2100/vcpkg/installed/x64-windows/lib/freetype.lib;debug;F:/warzone2100/vcpkg/installed/x64-windows/debug/lib/freetyped.lib (found version "2.8.1")
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found Harfbuzz: F:/warzone2100/vcpkg/installed/x64-windows/include/harfbuzz (found suitable version "1.8.4", minimum required is "1.0")
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Linking to SDL2 library: SDL2::SDL2
-- Main target should link to SDL2Main: SDL2::SDL2main
-- Found OpenAL: F:/warzone2100/vcpkg/installed/x64-windows/debug/lib/OpenAL32.lib
-- Looking for vorbis_bitrate_addblock in vorbis
-- Looking for vorbis_bitrate_addblock in vorbis - not found
-- Found OggVorbis: F:/warzone2100/vcpkg/installed/x64-windows/debug/lib/ogg.lib;F:/warzone2100/vcpkg/installed/x64-windows/debug/lib/vorbis.lib;F:/warzone2100/vcpkg/installed/x64-windows/debug/lib/vorbisfile.lib
-- Found theora: F:/warzone2100/vcpkg/installed/x64-windows/debug/lib/theoraenc.lib
-- 7z supports switch: -bb0 ... YES
-- Found ZIP: C:/Program Files/7-Zip/7z.exe
-- Could NOT find Asciidoctor (missing: Asciidoctor_COMMAND)
-- Could NOT find A2X (missing: A2X_COMMAND)
CMake Warning at doc/CMakeLists.txt:38 (message):
Neither Asciidoctor nor a2x was found. Documentation cannot be generated
unless at least one is installed. (Skipping documentation generation.)


-- Found Gettext: C:/Program Files/Git/usr/bin/msgmerge.exe (found suitable version "0.19.8.1", minimum required is "0.18")
-- Set TARGET warzone2100 LINK_FLAG: /MANIFEST:NO ... YES
-- Set TARGET warzone2100 LINK_FLAG: /NXCOMPAT ... YES
-- Set TARGET warzone2100 LINK_FLAG: /DYNAMICBASE ... YES
-- fixup_bundle: IGNORE_ITEM msvcp140.dll;vcruntime140.dll;concrt140.dll;api-ms-win-core-console-l1-1-0.dll;api-ms-win-core-datetime-l1-1-0.dll;api-ms-win-core-debug-l1-1-0.dll;api-ms-win-core-errorhandling-l1-1-0.dll;api-ms-win-core-file-l1-1-0.dll;api-ms-win-core-file-l1-2-0.dll;api-ms-win-core-file-l2-1-0.dll;api-ms-win-core-handle-l1-1-0.dll;api-ms-win-core-heap-l1-1-0.dll;api-ms-win-core-interlocked-l1-1-0.dll;api-ms-win-core-libraryloader-l1-1-0.dll;api-ms-win-core-localization-l1-2-0.dll;api-ms-win-core-memory-l1-1-0.dll;api-ms-win-core-namedpipe-l1-1-0.dll;api-ms-win-core-processenvironment-l1-1-0.dll;api-ms-win-core-processthreads-l1-1-0.dll;api-ms-win-core-processthreads-l1-1-1.dll;api-ms-win-core-profile-l1-1-0.dll;api-ms-win-core-rtlsupport-l1-1-0.dll;api-ms-win-core-string-l1-1-0.dll;api-ms-win-core-synch-l1-1-0.dll;api-ms-win-core-synch-l1-2-0.dll;api-ms-win-core-sysinfo-l1-1-0.dll;api-ms-win-core-timezone-l1-1-0.dll;api-ms-win-core-util-l1-1-0.dll;api-ms-win-crt-conio-l1-1-0.dll;api-ms-win-crt-convert-l1-1-0.dll;api-ms-win-crt-environment-l1-1-0.dll;api-ms-win-crt-filesystem-l1-1-0.dll;api-ms-win-crt-heap-l1-1-0.dll;api-ms-win-crt-locale-l1-1-0.dll;api-ms-win-crt-math-l1-1-0.dll;api-ms-win-crt-multibyte-l1-1-0.dll;api-ms-win-crt-private-l1-1-0.dll;api-ms-win-crt-process-l1-1-0.dll;api-ms-win-crt-runtime-l1-1-0.dll;api-ms-win-crt-stdio-l1-1-0.dll;api-ms-win-crt-string-l1-1-0.dll;api-ms-win-crt-time-l1-1-0.dll;api-ms-win-crt-utility-l1-1-0.dll;ucrtbase.dll
-- Configuring done
-- Generating done
-- Build files have been written to: F:/warzone2100/build
Last edited by dskiller1 on 16 Aug 2018, 07:48, edited 1 time in total.
User avatar
WZ2100ModsFAn
Trained
Trained
Posts: 371
Joined: 15 Apr 2018, 17:25
Location: United States.

Re: vs compile warnings causing errors?

Post by WZ2100ModsFAn »

I have the same problem.

I don't know how to fix it either. :(

Can @pastdue help?
dskiller1
Rookie
Rookie
Posts: 20
Joined: 18 Sep 2016, 02:33

Re: vs compile warnings causing errors?

Post by dskiller1 »

edit:

I been trouble shooting with cmd compiling. but should apply to using vs IDE

with this option in cmakelist.txt

OPTION(WZ_ENABLE_WARNINGS_AS_ERRORS "Enable compiler flags that treat (most) warnings as errors" ON)

is capturing all warnings as errors and wont build anything.

turning the option off

OPTION(WZ_ENABLE_WARNINGS_AS_ERRORS "Enable compiler flags that treat (most) warnings as errors" OFF)

it works. but doesnt package everything together. .dll and files need to put together.

needless to say I did get it working.
samuraicrow
Greenhorn
Posts: 12
Joined: 15 Sep 2015, 17:50

Re: vs compile warnings causing errors?

Post by samuraicrow »

It's not just VS. GCC 7.3 warns that GCC 7.1 had a change in the vector normal_iterator() that is putting a warning on wzstring.
pastdue
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 339
Joined: 13 Aug 2017, 17:44

Re: vs compile warnings causing errors?

Post by pastdue »

samuraicrow wrote: 01 Oct 2018, 11:13 It's not just VS. GCC 7.3 warns that GCC 7.1 had a change in the vector normal_iterator() that is putting a warning on wzstring.
Could you please post the full error / warning message output by GCC 7.3?
dskiller1
Rookie
Rookie
Posts: 20
Joined: 18 Sep 2016, 02:33

Re: vs compile warnings causing errors?

Post by dskiller1 »

I do eventually get it to compile through CMD . but it doesnt package it. so I have to copy the needed files together , but it doesnt run on windows 10 1809. gives (initialize_physicsFS:571,there was a problem trying to init Physfs. Error was no error). and doesnt make a log

how ever it works on windows 7 and works on windows 10 1803.

but older builds do work on windows 10 1809.....
Quenton
Rookie
Rookie
Posts: 29
Joined: 29 May 2016, 03:58

Re: vs compile warnings causing errors?

Post by Quenton »

dskiller1 wrote: 19 Oct 2018, 07:01 I do eventually get it to compile through CMD . but it doesnt package it. so I have to copy the needed files together , but it doesnt run on windows 10 1809. gives (initialize_physicsFS:571,there was a problem trying to init Physfs. Error was no error). and doesnt make a log

how ever it works on windows 7 and works on windows 10 1803.

but older builds do work on windows 10 1809.....
You sell this game on windows store but no provide source changes
User avatar
moltengear
Trained
Trained
Posts: 170
Joined: 22 Jul 2017, 15:05

Re: vs compile warnings causing errors?

Post by moltengear »

Quenton wrote: 03 Nov 2018, 00:03 You sell this game on windows store but no provide source changes
It's not us. These are thieves! Be careful!
dskiller1
Rookie
Rookie
Posts: 20
Joined: 18 Sep 2016, 02:33

Re: vs compile warnings causing errors?

Post by dskiller1 »

Just didnt have enough time to write down changes and list them ,when it was ported over to the windows store in May,which is the last build that was able to compile correctly.
but did list links to the Github source.
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: vs compile warnings causing errors?

Post by vexed »

dskiller1 wrote: 09 Nov 2018, 10:53 Just didnt have enough time to write down changes and list them ,when it was ported over to the windows store in May,which is the last build that was able to compile correctly.
but did list links to the Github source.
Last I was told, you are charging for the version that is on the Windows store, and have changed references to this project.

We have to keep the server up, and that costs $$$ which we get from donations, it ALL goes to server costs, nothing else. Leaving in the donation links isn't asking too much, since if we can't have a server, then the project dies.

As for the changes, I assume you are under revision control, so it would be trivial to generate a patch file of all the changes that were made, would it not?

Also, for the record, I don't like people selling free games, I know it isn't against GPL rules, as long as that is followed, but, I still think it is wrong.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
Post Reply