Welcome to the Builder Academy

Question Running on Windows using Visual Studio

More
21 Jul 2018 19:26 - 29 Aug 2020 16:00 #8144 by Parnassus
To start with, let's go through some warnings here:

I don't actually know what I'm doing so some of what I say will be inefficient and some will not be done in a recommended way. They are just done is a way that worked for me.
My way of thinking and explaining are a little odd and may not be understandable by normal people. Some things here are not even understandable by me. Post and I'll try to fix it.
I'm spoilering everything so you hopefully don't feel like you're wading through an ocean.
I'm using Windows 8.1.

If you're just learning how to customize TBA, here are some tools that might make it a bit easier:
Warning: Spoiler!

Here are things you'll need to follow these instructions (ingredient list):
Warning: Spoiler!

Okay, on to the good stuff!
Warning: Spoiler!

If you build it now (you didn't, right? You're still following the instructions, right?) you'll get an error. Let's do the Quick and Dirty fix which looks bad but, frankly, I don't know how to actually fix it... I'm hoping someone out there can fix it for me *innocent whistle*. Edit: okay, I found on recompiling the mud that this error did NOT re-occur. Therefore, you might want to compile to see if it does or it doesn't. If you see an error that says this:
error C2065: 'HUH': undeclared identifier
THEN open the spoiler :)
Warning: Spoiler!

Back to compiling the game:
Warning: Spoiler!

Now, before you check to see if your mud runs, let's talk about this constant crash problem. We'll need to leave VS for a while but don't close it. Let's leave it open until we find out if this actually all worked!
Warning: Spoiler!


*HINT* In lib/etc, I place empty files named config and hcontrol because the game kept complaining that it couldn't find them. It doesn't seem to do anything but I don't have to read that the game can't find the files every time I turn it on.

Now, let's go back to the root directory and doubleclick the <ProjectName>.exe file. Hopefully your mud will now start up! As always, first player in will be your Admin character.

If these instructions don't work and you know why, please post so I can edit this post. Same with any improvements you can think up. If they don't work and you don't know why, also post so that I can try to improve the instructions.

Thanks for reading all this and have fun!
Last edit: 29 Aug 2020 16:00 by Parnassus. Reason: Change in HUH error. Input cry1004's suggestion of using conf.h.msvs instead of conf.h.win
The following user(s) said Thank You: WhiskyTest, cry1004

Please Log in or Create an account to join the conversation.

More
04 Aug 2018 12:21 #8168 by Parnassus
I started working on VS when my computer broke and I found that I couldn't run my Cygwin version on a different computer because Cygwin needed to be installed. I hoped that I would be able to run the VS version off a USB.

I've now tried my USB on a Windows7 computer and got an error: vcruntime140d.dll is missing. I added vcruntime140d.dll to my USB. I think that worked because I then got a different error which I can't find in my notes. However, it's possible that VS must be installed on the target computer also. There's another possibility that my USB might work on another Windows8.1 but not on Windows7.

Even if I need to install VS, I find that much easier than installing Cygwin because VS is one download while you need to choose Cygwin packages. Some of the packages are handy and/or interesting but choosing is much too confusing for me.

Please Log in or Create an account to join the conversation.

More
04 Aug 2018 12:38 #8169 by Parnassus
Every once in a while, my Windows TBA crashes when I do "score". At first I thought it was snippet error and I kept rolling back my snippets. I've since found that I can type score and see score and type it again later and have the mud crash.

What are my options here? Do I need to DGB and do I need to download a program for that? All my log files are empty. Is there a way to make my crash log work? Also, I think there's something about making a batch file to run a program with stuff in it so that you can see info in a window after the game crashed instead of having the window close.

Would any of this work for me?

Please Log in or Create an account to join the conversation.

More
05 Aug 2018 12:01 #8170 by thomas
You need the visual runtime installed, not all of visual studio. support.microsoft.com/en-us/help/2977003...d-visual-c-downloads

Please Log in or Create an account to join the conversation.

More
05 Aug 2018 12:17 #8171 by thomas

Parnassus wrote: Every once in a while, my Windows TBA crashes when I do "score". At first I thought it was snippet error and I kept rolling back my snippets. I've since found that I can type score and see score and type it again later and have the mud crash.

What are my options here? Do I need to DGB and do I need to download a program for that? All my log files are empty. Is there a way to make my crash log work? Also, I think there's something about making a batch file to run a program with stuff in it so that you can see info in a window after the game crashed instead of having the window close.

Would any of this work for me?

Debugging on windows isn't something I usually do.

Regarding getting the logging to work as you want, on windows you need to choose - either you get the output to the window or to a file. I suggest you try one of the autorun.bat scripts in the downloads: drive.google.com/drive/search?q=autorun
I haven't tried them, but you should at least be able to to glean some ideas.

Apart from that - crashing on windows where there's a visual studio installation will trigger a popup allowing you to debug the code right then and there. If no such installation is present, you don't get to debug, as far as I know.

Please Log in or Create an account to join the conversation.

More
05 Aug 2018 16:41 #8172 by Parnassus
Thanks for the replies. The autorun search didn't work for me but I'll just keep messing around in my weird way. The crash seems pretty rare so it's okay to live with for now.

Please Log in or Create an account to join the conversation.

Time to create page: 0.223 seconds