One thing is that the wiki mentions using Visual Studio 2019. I found that I was getting errors saying the v141_xp toolkit was missing. It seems the v141 build tools are available through the Visual Studio 2019 Community installer, but it seems specifically the v141 XP tools have been deprecated and removed. In order to install the v141_xp tools, I had to also install Visual Studio 2017 Community and enable the XP build tools during the install.
Also, while building, Visual Studio reported gitinfo.bat was returning with error code 255. I found gitinfo.bat was trying to run tr (the GNU translate tool), and I didn't have that installed for Windows. I downloaded the GNU Core utils for Windows here & installed that, which solved that issue: http://gnuwin32.sourceforge.net/packages/coreutils.htm
After that, still just 3 of the projects failed to build. VS reports build errors for sbbs, textgen, delfiles, and upgrade_to_v319. The errors are all from text.h regarding a missing #endif, and when I checked text.h, it's incomplete - The last line is "enum :":
/* text.h */
/* Synchronet static text string constants */
/*************************************************************************** */ /* Macros for elements of the array of pointers (text[]) to static text*/ /* Auto-generated from CTRL\TEXT.DAT*/ /************************************ ****************************************/
#ifndef _TEXT_H
#define _TEXT_H
enum {
I seem to remember seeing something a while ago that generates text.h, but I don't remember what it was now.
What I'd like to do is to build the debug binaries for Windows and attach the VS debugger to the sbbsctrl process, because I'm still finding that Synchronet tends to crash every so often on my setup (requiring a program to perodically check to see whether sbbsctrl.exe is running, and re-start it if it's not).
That looks like textgen failed (crashed?) when trying to generate the files (text.h, text.js).
Re: Build instructions for Windows
By: Digital Man to Nightfox on Fri Jul 23 2021 03:24 pm
That looks like textgen failed (crashed?) when trying to generate the files (text.h, text.js).
I've found that when tryign to build textgen, text.h is incomplete so textgen fails to build. I tried copying the full text.h from the git repository and pasting it into my text.h and textgen was able to build. I also found that the SBBSEXEC environment variable has to be set (pointing to the sbbs\exec directory). Now when I try to build Synchronet in Visual Studio, it's complaining about unidentified identifiers in sbbs:
file.cpp: FChecksum, FTags, FAuthor, FGroup, FUploadedTo, TagFilePrompt, EditExtDescriptionQ
netmail.cpp: FidoNetMailSent, QWKNetMailSent, InternetMailSent
upload.cpp: TagFileQ, TagFilePrompt
useredit.cpp: HowManyColumns, FileInfoEditPrompt
textgen *creates* the text.h file (from your text.dat file). Looks like you're trying to use an *older* text.h file. Those enums are in the current text.h in Git. Perhaps your text.dat file is just old?
Re: Build instructions for Windows
By: Digital Man to Nightfox on Fri Jul 23 2021 10:30 pm
textgen *creates* the text.h file (from your text.dat file). Looks like you're trying to use an *older* text.h file. Those enums are in the current text.h in Git. Perhaps your text.dat file is just old?
I did a "git pull", and it says I'm already up to date.
I tried deleting my text.h and rebuilding the solution, and VS said 20 succeeded and 20 failed. All the errors now are due to text.h being missing.
Then I wondered if I need to just build textgen and run that first. But even textgen fails to build because text.h is missing (apparently the textgen project includes sbbs.h which tries to include text.h).
I'm at a bit of a loss right now about what I can do to get the sbbs solution to build.
Just get the current text.h from git via "git pull". You can remove or disable the textgen project from your solution since its causing you such problems. The text.h from Git is all you need.
Great, would love to get the root-cause of any crashing bugs. :-)
Re: Build instructions for Windows
By: Digital Man to Nightfox on Fri Jul 23 2021 03:24 pm
Great, would love to get the root-cause of any crashing bugs. :-)
Interesting thing, I've been running my debug build of Synchronet with Visual Studio's debugger monitoring it now for 6 days and it hasn't crashed yet.. Before this, it seemed it was randomly crashing after anywhere between several hours to a couple days or so. So I'm still not sure what's triggering the crash. I'm wodnering if there's anything different about the debug build where the crash might not be triggered with this build..
I am running my BBS in a virtual machine, and I increased the VM specs a little bit to allow it to run Visual Studio's debugger more easily without the VM getting slow. I increased the VM CPU core count from 1 to 2, and increased the RAM from 2GB to about 3.5GB. I'm not sure if that would make a difference with the particular crash I was seeing.
They say the watched pot never boils.. But who knows, maybe it will crash right after I send this message.. :P
Debug builds run slower than non-debug builds and that can sometimes prevent crash-causing race conditions from occurring. But those bugs are fairly rare. There are other differences in debug builds (e.g. optimizations disabled), so you could try running a release (non-debug) build instead and see if the problem seems to happen more often.
Re: Build instructions for Windows
By: Digital Man to Nightfox on Sat Jul 31 2021 04:57 pm
Debug builds run slower than non-debug builds and that can sometimes prevent crash-causing race conditions from occurring. But those bugs are fairly rare. There are other differences in debug builds (e.g. optimizations disabled), so you could try running a release (non-debug) build instead and see if the problem seems to happen more often.
That may be what's going on. I was hoping that by using the debug build, I could have Visual Studio show what point in the code is causing the crash. Visual Studio can still debug release builds, but I'm not sure it would have enough information with a release build to identify the line of code causing a crash.
I'm not sure it would have enough information with a release build to
identify the line of code causing a crash.
It will. A debug build is not required to find the line of code where an exception/crash occurs.
Re: Build instructions for Windows
By: Digital Man to Nightfox on Mon Aug 02 2021 12:13 pm
I'm not sure it would have enough information with a release build to
identify the line of code causing a crash.
It will. A debug build is not required to find the line of code where an exception/crash occurs.
I always thought a debug build was the only way to generate debug information for that kind of thing. But after thinking about it, I think Visual Studio can build .pdb files with source code information for a release build as well?
Sysop: | MarisaG |
---|---|
Location: | South San Francisco, CA |
Users: | 82 |
Nodes: | 15 (0 / 15) |
Uptime: | 225:56:44 |
Calls: | 1,436 |
Calls today: | 1 |
Files: | 7 |
Messages: | 22,037 |