Page 1 of 1

snprintf error

Posted: 2018-11-20, 22:43
by arfur9

Code: Select all

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64>cd C:\Users\nige\Desktop\cafu\Cafu

scons: Reading SConscript files ...

nmake /nologo /f BUILD=debug SHARED=0 COMPILER_PREFIX=vc12 TARGET_CPU=AMD64
nmake /nologo /f BUILD=release SHARED=0 COMPILER_PREFIX=vc12 TARGET_CPU=AMD64

scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build\win32\vc12\x86_64\debug build\win32\vc12\x86_64\release
cl /Fobuild\win32\vc12\x86_64\release\Ca3DE\ClientMainWindow.obj /c Ca3DE\ClientMainWindow.cpp /TP /nologo /GR /EHsc /MD /O2 /Ob2 /GL /J /W3 /WX /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /D_WINSOCK_DEPRECATED_NO_WARNINGS /DNDEBUG /DSCONS_BUILD_DIR=build/win32/vc12/x86_64/release /IExtLibs\freetype\include /IExtLibs\libpng /IExtLibs\zlib /ILibs /IExtLibs /Ibuild\win32\vc12\x86_64\release\ExtLibs\lua\src /IExtLibs\lua\src /Ibuild\win32\vc12\x86_64\release\ExtLibs\bullet\src /IExtLibs\bullet\src /Ibuild\win32\vc12\x86_64\release\ExtLibs\glfw\include /IExtLibs\glfw\include /Ibuild\win32\vc12\x86_64\release\ExtLibs\tclap\include /IExtLibs\tclap\include
Ca3DE\ClientMainWindow.cpp(386) : error C3861: 'snprintf': identifier not found
scons: *** [build\win32\vc12\x86_64\release\Ca3DE\ClientMainWindow.obj] Error 2
scons: building terminated because of errors.
I'm getting the following error trying to compile

Re: snprintf error

Posted: 2018-11-21, 14:44
by arfur9
I solved it by putting a "_" in front of snprintf

Bigger issue is that AVG thinks Cafu is a threat and has just removed all the exe's from my deploy folder :/

Re: snprintf error

Posted: 2018-11-21, 15:27
by arfur9
Ok after a reboot and a trip to quarantine all is well with the world and everything works :)

I really think you should update the executables on the main site, its getting to the point where the dates make it look like the project is abandoned, plus its a "bit of a do" to build anyway, I've done it 3 times and I still hit snags, like above lol, I used VS2013 last time and it worked

Re: snprintf error

Posted: 2018-11-21, 23:48
by Carsten
Hi arfur,

it's good to hear that you could resolve the problem with the snprintf() call! :up:

Were the executables that AVG removed those that ship with the 2013 demo or those in your custom build?
Do you have any details about what AVG's complaint with these files is?

I'm still a bit indecisive about how to proceed with the binary demo files. While the project is certainly not abandoned and I have no intentions of doing so, it is also true that my focus has shifted a little and that these days I have less time left that I can spend on Cafu. (Coincidentally, I recently experimented with CMake to make a better build system for all platforms, also to make the "getting started" easier. Unfortunately, the documentation of CMake is still so frustrating that I was, so far, not able to make much progress.)
So ideally, it would be possible to achieve complete builds with CMake and to use those to update the files of the binary demos... :up:

Re: snprintf error

Posted: 2018-11-22, 10:08
by arfur9
It removed all the exes from a custom build, I haven't tried the 2013 demo
I tried to run the cafu exe and it didn't start and came up with the virus alert and sent everything directly to the vault and that I needed to restart, in quarantine it has it as a generic issue, and after the restart it allowed me to restore the files
Its tried to do it again running a game but it allowed me to add it to exceptions this time, if it happens again I'll make a note of everything

I can imagine more activity would more motivation, I was going to offer a dropbox link to my build but I used the fbx sdk
CMake would be very nice ;)
I had python 2.7 still installed with all the necessary scripts so it was just a simple matter of setting the system environment again

Re: snprintf error

Posted: 2018-11-25, 12:37
by Carsten
It's normal that when a Cafu executable is run for the first time, there is a question if it is allowed to open a network connection. This is because we actually run a network game even for single player games, connecting the local client to the local server in the same executable. But the virus scanner should not move the executable entirely to the quarantine, at least it should give a reason what triggered that descision.

With CMake there were several important changes in their relatively new 3.x series and I've been waiting for this book to be released:
I just purchased a copy – be assured that I'll do my best to come up with a complete CMake build as soon as I've read it (or possibly as I'm reading it). It would be very worthwhile if we could also derive all the other benefits that it can provide, e.g. test suits, proper installers for Windows, packaging for Linux systems, etc.

Re: snprintf error

Posted: 2018-11-29, 13:14
by arfur9
AVG seemed to get very trigger happy, it also decided Powershell was also a virus, after a bit of research as others had encountered the same problem I did a repair and now it seems ok , its not had issues with Powershell or Cafu since :)

I can imagine its a major task to migrate to CMake but I'm sure it will be worth it in the end