Server Build Errors Using Visual Studio 2017

Post Reply
CoutteFlow
Posts: 1
Joined: Tue Apr 25, 2017 8:05 pm

Server Build Errors Using Visual Studio 2017

Post by CoutteFlow » Tue Apr 25, 2017 8:26 pm

I have been following the steps on the Windows Section of the Building the Server Guide (The top half of https://wiki.dspt.info/index.php/Building_the_Server) and I assumed I was doing so correctly until I reached the point where I attempt to clean and build the DSConnect, DSGame, and DSSearch servers in Visual Studio 2017 where it fails with 1600 errors. I am sure that the Mysql dspdb database has been created using the DSP_Import.bat file, though it seems like I am missing many files (About 23) such as accounts.sql, auction_house.sql, chars.sql, and others that do not appear in the database folder and navicat, but are referenced in the guide and the DSP_Import.bat file that should not drop all of the player data. I have downloaded and installed all possible C++ dependencies for Visual Studio, but I am not sure how to resolve the #include errors effectively, because there are so many errors. Does anyone have information on whether I have made a mistake, missed some instruction, or if I am missing necessary files?

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: Server Build Errors Using Visual Studio 2017

Post by demolish » Tue Apr 25, 2017 8:36 pm

git reset --hard HEAD (or was it git reset -f)
and try building again, looks like something went wrong when cloning

also use only

Code: Select all

ECHO Creating Database dspdb
"c:\program files\mysql\mysql server 5.6\bin\mysqladmin"-h localhost -u root -pMYSQLPASS DROP dspdb

ECHO Creating Database dspdb
"c:\program files\mysql\mysql server 5.6\bin\mysqladmin"-h localhost -u root -pMYSQLPASS CREATE dspdb

ECHO Loading dspdb tables into the database
cd c:\darkstar\sql
FOR %%X IN (*.sql) DO ECHO Importing %%X & "c:\program files\mysql\mysql server 5.6\bin\mysql" dspdb -h localhost -u root -pMYSQLPASS < %%X

ECHO Finished!
instead of the delete stuff later unless youre updating server from previous revision and wish to preserve char data
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

IChrisSmith
Posts: 2
Joined: Wed Jul 12, 2017 10:12 pm

Re: Server Build Errors Using Visual Studio 2017

Post by IChrisSmith » Wed Jul 12, 2017 10:17 pm

I am currently having a similar issue. Followed everything step by step, even watched several video. When building I get 238 Errors.

Mostly all Code: C1083 Cannot open include file: 'stdlib.h': No such file or directory DSGame-server c:\dsp\src\common\detour\detouralloc.cpp

I attached a Screenshot as well.

Thank you.
Attachments
Missing Files.PNG

User avatar
whasf
Site Admin
Posts: 1310
Joined: Thu Jul 19, 2012 9:11 pm

Re: Server Build Errors Using Visual Studio 2017

Post by whasf » Thu Jul 13, 2017 1:04 pm

IChrisSmith wrote:I am currently having a similar issue. Followed everything step by step, even watched several video. When building I get 238 Errors.

Mostly all Code: C1083 Cannot open include file: 'stdlib.h': No such file or directory DSGame-server c:\dsp\src\common\detour\detouralloc.cpp

I attached a Screenshot as well.

Thank you.
Sounds like the Windows SDK isn't installed. I don't know how, as that is a part of a standard install of Visual Studio. Re-run the setup and make sure it is selected. Or find the Windows 8.1 SDK on the internet and install it. (I think that's the version (@Teo)?)
-- Whasf

IChrisSmith
Posts: 2
Joined: Wed Jul 12, 2017 10:12 pm

Re: Server Build Errors Using Visual Studio 2017

Post by IChrisSmith » Thu Jul 13, 2017 5:54 pm

Hello,

That was one of the issues I was having before.

I was at 573 Errors prior to installed SDK 8.1.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Server Build Errors Using Visual Studio 2017

Post by TeoTwawki » Fri Jul 14, 2017 2:14 pm

@whasf we don't require a specific version of the SDK that I know of, I think you just have to have any win sdk at all that worked with win7 or higher? Am not 100% on that, I have multiple projects with so many diff build targets that I have so many GB of bloat on my system I can't tell.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

User avatar
whasf
Site Admin
Posts: 1310
Joined: Thu Jul 19, 2012 9:11 pm

Re: Server Build Errors Using Visual Studio 2017

Post by whasf » Fri Jul 14, 2017 2:48 pm

I think you changed the target for DSP back to Win8.1, I just retarget oldschool to the win10 SDK on my machine here... :-)
-- Whasf

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Server Build Errors Using Visual Studio 2017

Post by TeoTwawki » Fri Jul 14, 2017 9:10 pm

whasf wrote:I think you changed the target for DSP back to Win8.1, I just retarget oldschool to the win10 SDK on my machine here... :-)
I set the target to default to whatever the system has. In VS my understanding was that if you don't specify a specific version it just uses the first one it finds that matches up the OS its running from (and seemed to work that way from muh crappy laptop).

b49e2238a868a517fa1bd3dd1aae1fa4b8e223bf
Commit Message wrote:Remove WindowsTargetPlatformVersion entirely - doesn't need specified.
If we do need to actually specify, I can prolly stick that in the section specific to the newer toolset builds instead of globally for all 4 build configs where it can cause probs.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

Post Reply