snprintf error

Get help with installing and running the Cafu Engine here. This forum is also for general questions and discussion of all aspects regarding the Cafu Engine.
Post Reply
User avatar
arfur9
Posts:90
Joined:2017-02-25, 18:57
Location:uk
Contact:
snprintf error

Post by arfur9 » 2018-11-20, 22:43

Code: Select all

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

C:\Users\nige\Desktop\cafu\Cafu>scons
scons: Reading SConscript files ...

os.chdir('ExtLibs/wxWidgets/build/msw')
nmake /nologo /f makefile.vc BUILD=debug SHARED=0 COMPILER_PREFIX=vc12 TARGET_CPU=AMD64
os.chdir('C:\\Users\\nige\\Desktop\\cafu\\Cafu')
os.chdir('ExtLibs/wxWidgets/build/msw')
nmake /nologo /f makefile.vc BUILD=release SHARED=0 COMPILER_PREFIX=vc12 TARGET_CPU=AMD64
os.chdir('C:\\Users\\nige\\Desktop\\cafu\\Cafu')

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
ClientMainWindow.cpp
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
User avatar
arfur9
Posts:90
Joined:2017-02-25, 18:57
Location:uk
Contact:

Re: snprintf error

Post by arfur9 » 2018-11-21, 14:44

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 :/
User avatar
arfur9
Posts:90
Joined:2017-02-25, 18:57
Location:uk
Contact:

Re: snprintf error

Post by arfur9 » 2018-11-21, 15:27

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
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: snprintf error

Post by Carsten » 2018-11-21, 23:48

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:
Best regards,
Carsten
User avatar
arfur9
Posts:90
Joined:2017-02-25, 18:57
Location:uk
Contact:

Re: snprintf error

Post by arfur9 » 2018-11-22, 10:08

Hi,
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
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: snprintf error

Post by Carsten » 2018-11-25, 12:37

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: https://crascit.com/professional-cmake/
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.
Best regards,
Carsten
User avatar
arfur9
Posts:90
Joined:2017-02-25, 18:57
Location:uk
Contact:

Re: snprintf error

Post by arfur9 » 2018-11-29, 13:14

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
Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests