i am having trouble getting SimpleMud to compile and was wondering if someone knows if there is a more up to date version out there that compiles or if someone had luck and could get it to compile.
I tried to find Mr.Pentons Homepage but it seems like it is taken of the Internet.
I tried to compile it with Code::Blocks , DevC++ and Borland C++ Builder 6.0 . I am using windows just as side information ;)
Noone have a clue how to get it to compile? Because when i try compiling it with Dev-c++ i get thousands of errors.
I looked at the other posts regarding SimpleMud but even with those changes i can't get it to compile
There are a few things that needs changing for it to work. I've used Visual Studio 2010 to compile it successfully and run it. Only actually works when compiling in release mode because when you run it after a compiling it for debug, you get a debug assertion failed error (Expression: map/set iterator not dereferencable) from EntityDatabase.h on line 154:
if( m_map.size() == m_map.rend()->first )
I don't know exactly how to fix that for debugging but it's fine as long as it's compiled as release.
I've changed all
#ifdef WIN32
to
#ifdef _WIN32
EntityDatabase.h Line 47~
iterator( const container::iterator& p_itr ) // copy constructor
should be
iterator( const typename container::iterator& p_itr ) // copy constructor
EntityDatabase.h Line 186~
typedef std::vector<datatype>::iterator iterator;
should be
typedef typename std::vector<datatype>::iterator iterator;
ConnectionManager.h Line 37~
typedef std::list< Connection<protocol> >::iterator clistitr;
should be
typedef typename std::list< Connection<protocol> >::iterator clistitr;
I can't remember any more changes I did except changing the linux sint64 and uint64 versions.
instead of using long long int I have this:
// ============================================================
// This defines the 64 bit datatype
// ============================================================
I haven't actually compiled SimpleMUD on linux yet so, and probably never will, but someone using linux might want to change to int64_t instead of long long int.
If I missed something let me know which error you get from compiling.
i get this error when compiling the code in visual c++ 2010 express (with dev c++ or codeblocks i can't compile either)and yes the three Library folders like on the Cd BasicLib, SocketLib and ThreadLib are in the SimpleMud Folder and i have edited like you told me:
" 1>------ Erstellen gestartet: Projekt: SimpleMUD, Konfiguration: Release Win32 ------
1> DatabasePointer.cpp
1>c:\users\thorbenn\desktop\rons stuff\simplemud\simplemud\Entity.h(14): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Enemy.cpp
1>c:\users\thorbenn\desktop\rons stuff\simplemud\simplemud\Enemy.h(14): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> EnemyDatabase.cpp
1>SimpleMUD\EnemyDatabase.cpp(10): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Game.cpp
1>c:\users\thorbenn\desktop\rons stuff\simplemud\simplemud\Logon.h(11): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "SocketLib/SocketLib.h": No such file or directory
1> GameLoop.cpp
1>SimpleMUD\GameLoop.cpp(9): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLibTypes.h": No such file or directory
1> ItemDatabase.cpp
1>SimpleMUD\ItemDatabase.cpp(9): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Logon.cpp
1>c:\users\thorbenn\desktop\rons stuff\simplemud\simplemud\Logon.h(11): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "SocketLib/SocketLib.h": No such file or directory
1> Player.cpp
1>c:\users\thorbenn\desktop\rons stuff\simplemud\simplemud\SimpleMUDLogs.h(12): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLibLogger.h": No such file or directory
1> PlayerDatabase.cpp
1>SimpleMUD\PlayerDatabase.cpp(9): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Room.cpp
1>c:\users\thorbenn\desktop\rons stuff\simplemud\simplemud\Room.h(15): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> RoomDatabase.cpp
1>SimpleMUD\RoomDatabase.cpp(10): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> SimpleMUDLogs.cpp
1>c:\users\thorbenn\desktop\rons stuff\simplemud\simplemud\SimpleMUDLogs.h(12): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLibLogger.h": No such file or directory
1> StoreDatabase.cpp
1>SimpleMUD\StoreDatabase.cpp(9): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Train.cpp
1>SimpleMUD\Train.cpp(8): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> SocketLibErrors.cpp
1>c1xx : fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\Libraries\SocketLib\SocketLibErrors.cpp": No such file or directory
1> SocketLibSocket.cpp
1>c1xx : fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\Libraries\SocketLib\SocketLibSocket.cpp": No such file or directory
1> SocketLibSystem.cpp
1>c1xx : fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\Libraries\SocketLib\SocketLibSystem.cpp": No such file or directory
1> SocketSet.cpp
1>c1xx : fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\Libraries\SocketLib\SocketSet.cpp": No such file or directory
1> Telnet.cpp
1>c1xx : fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\Libraries\SocketLib\Telnet.cpp": No such file or directory
1> ThreadLibFunctions.cpp
1>c1xx : fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\Libraries\ThreadLib\ThreadLibFunctions.cpp": No such file or directory
1> Code wird generiert...
1> Kompilieren...
1> BasicLibRandom.cpp
1>c1xx : fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\Libraries\BasicLib\BasicLibRandom.cpp": No such file or directory
1> BasicLibString.cpp
1>c1xx : fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\Libraries\BasicLib\BasicLibString.cpp": No such file or directory
1> BasicLibTime.cpp
1>c1xx : fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\Libraries\BasicLib\BasicLibTime.cpp": No such file or directory
1> SimpleMUD.cpp
1> Code wird generiert...
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ========== "
Could you maybe send me an edited version of simplemud via email?
http://dl.dropbox.com/u/6244950/SimpleMUD.7z <-- I zipped the edited code, apart from this, you need to add ws2_32.lib as additional dependencies in Linker -> Input in VS2010 Property sheet pages. As well as fixing the VC++ Directories, just as the compiler appendix in the book mentions for VS6 and VS7. VS2010 has changed a little since then though.
The error you posted basically just says you haven't added the SocketLib, ThreadLib and BasicLib file. they aren't included in the SimpleMUD source code but rather in the libraries folder on the cd. They are all in the zip file.
As for the
if( m_map.size() == m_map.rend()->first )
line, I think it should be (m_map.rend()-1)->first since rend() points one past the end of the map. But not sure since I haven't tried that yet. Just a wild guess ^.^
thx for uploading the edited code. I know this question might sound stupid but how do i add a linker in vc++ 2010?
I had the libs in the same folder as SimpleMud like you have it in the zipped version. when i try to compile your version it still comes that it doesn"t find BasicLib or SocketLib.
"
1>------ Erstellen gestartet: Projekt: SimpleMUD, Konfiguration: Release Win32 ------
1> DatabasePointer.cpp
1>c:\users\thorbenn\desktop\simplemud\simplemud\Entity.h(14): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Enemy.cpp
1>c:\users\thorbenn\desktop\simplemud\simplemud\Enemy.h(14): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> EnemyDatabase.cpp
1>SimpleMUD\EnemyDatabase.cpp(10): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Game.cpp
1>c:\users\thorbenn\desktop\simplemud\simplemud\Logon.h(11): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "SocketLib/SocketLib.h": No such file or directory
1> GameLoop.cpp
1>SimpleMUD\GameLoop.cpp(9): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLibTypes.h": No such file or directory
1> ItemDatabase.cpp
1>SimpleMUD\ItemDatabase.cpp(9): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Logon.cpp
1>c:\users\thorbenn\desktop\simplemud\simplemud\Logon.h(11): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "SocketLib/SocketLib.h": No such file or directory
1> Player.cpp
1>c:\users\thorbenn\desktop\simplemud\simplemud\SimpleMUDLogs.h(12): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLibLogger.h": No such file or directory
1> PlayerDatabase.cpp
1>SimpleMUD\PlayerDatabase.cpp(9): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Room.cpp
1>c:\users\thorbenn\desktop\simplemud\simplemud\Room.h(15): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> RoomDatabase.cpp
1>SimpleMUD\RoomDatabase.cpp(10): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> SimpleMUDLogs.cpp
1>c:\users\thorbenn\desktop\simplemud\simplemud\SimpleMUDLogs.h(12): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLibLogger.h": No such file or directory
1> StoreDatabase.cpp
1>SimpleMUD\StoreDatabase.cpp(9): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Train.cpp
1>SimpleMUD\Train.cpp(8): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> SocketLibSocket.cpp
1>c:\users\thorbenn\desktop\simplemud\socketlib\SocketLibSocket.h(14): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> SocketSet.cpp
1>c:\users\thorbenn\desktop\simplemud\socketlib\SocketSet.h(12): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
1> Telnet.cpp
1>c:\users\thorbenn\desktop\simplemud\socketlib\Connection.h(15): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "BasicLib/BasicLib.h": No such file or directory
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ========== "
In VS2010. Open the Project, then go to View -> Property Manager.
Here you'll see a list of all the property sheets to all projects in the solution.
In the SimpleMUD tree, open up SimpleMUD -> Release|Win32
Here you'll see "Microsoft.Cpp.Win32.user". Select it, then at the top of the Property Manager, click on "Add New Project Property Sheet" and you might call it MUDProgramming or something. This will set some default settings to all the projects you ever make. Double click on the new MUDProgramming property sheet that appears.
Here, go to Common Properties -> VC++ Directories. In Include Directories, click on it to get the down arrow to the right and click there to open up the menu for that input box. Click <Edit...> in the menu.
Here you want to add the paths to the Libraries and the path to the Python include folder (for BetterMUD later on).
Just click on the Folder icon to add a new line then click the "..." that appears to browse to the libraries (SocketLib, ThreadLib, BasicLib). Basically you just have to select your project folder which includes all three library folders.
As for python. If you installed it at the default place. It's C:\Python32\include <-- or the version you installed of python. Click the ok button to finish.
Next is the Library Directories which is also mostly only for BetterMUD. Do the same here but add C:\Python32\libs folder.
Now we need to add some additional dependencies. Go to Common Properties -> Linker -> Input.
Click on Additional Dependencies and select <Edit...> from the menu.
Add these two lines:
ws2_32.lib
python32.lib
i have problems finding "Microsoft.Cpp.Win32.user". I open the project with Visual c++ express and then go on to SimpleMud and then to source and open simpleMud.cpp. but when i go to properties there is no "Microsoft.Cpp.Win32.user". I am guessing i am doing something wrong or not seeing something right. I am really sorry but this is the first time i am using visual c++ dev c++ is what i am used too. :(
You are probably in the Solution Explorer, which is where you see all the source files like SimpleMUD.cpp etc.
To see Microsoft.Cpp.Win32.user you need to open the Property Manager. You can find it in the View menu at the top of VS2010. View -> Property Manager. That should open the Property Manager at the same place the Solution Explorer was at.
Now open SimpleMUD -> Release|Win32 and you should see it.
Property Manager is the manager for the "Project Property Sheets" of the project.
Edit:
I also forgot to mention. After you've made a "Property Sheet" and pressed ok in the properties dialog of it. You need to right-click on it and Save it. It won't save automatically.
I'm not very good with "error LNK2001: unresolved external symbol" errors.
The problem is that the linker can't find the definitions of those functions.
But since you are using the exact same files as me and now the same setup in VS2010, it should just work.
The code compiles at least, now for the linking step to work...
Do the SocketLib folder contain SocketLibSocket.cpp and those other files? Do they contain the definitions?
Now when I look closer... it's the WinSock functions that it can't resolve to. That is, the problem is not with any of the functions from SimpleMUD and libs.
My guess is ws2_32.lib is missing... did you add ws2_32.lib to the Additional Dependencies in the property sheet? It should be under Common Properties -> Linker -> Input -> Additional Dependencies. It should look something like:
ws2_32.lib;python32.lib;%(AdditionalDependencies)
After having been edited with custom libs.
In the compiler help it should tell you the library belonging to WSAGetLastError as part of the function description. And yes, you add that to the custom libraries to be linked in, in the project linker properties.
i am having trouble running SimpleMUD even though it is compiled without errors. It compiles and then starts when i connect via mud client or cmd then i come to the login screen from SimpleMUD and want to make a account. I give in the username and then a password and then it says lost connection to host.
here is what comes after compiling from visual studio ultimate:
'SimpleMUD.exe': Loaded 'C:\Program Files\Kaspersky Lab\Kaspersky Security Suite CBE 11\kloehk.dll', Cannot find or open the PDB file
'SimpleMUD.exe': Loaded 'C:\Windows\System32\psapi.dll', Cannot find or open the PDB file
'SimpleMUD.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'SimpleMUD.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
'SimpleMUD.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_d08a205e442db5b5\msvcr80.dll', Cannot find or open the PDB file
'SimpleMUD.exe': Unloaded 'C:\Program Files\Kaspersky Lab\Kaspersky Security Suite CBE 11\kloehk.dll'
'SimpleMUD.exe': Loaded 'C:\Windows\System32\WSHTCPIP.DLL', Cannot find or open the PDB file
The thread 'Main Thread' (0x1270) has exited with code -1073741510 (0xc000013a).
The program '[4716] SimpleMUD.exe: Native' has exited with code -1073741510 (0xc000013a).
And what is also weird is there is only one little error in the source code but it doesn't harm the compiling and i don't understand why it is. because it is all fine
I've run into various problems with Ron Penton's code (I assume this is what you are talking about) not compiling using more modern compilers. It all worked when he wrote the book, but newer compilers have tightened up syntax, and indeed the way things work. I have already spent hours trying to get it to work previously.
I suggest you try instead to use SmaugFUSS or one of the currently-maintained code bases.
yes i guess i will be giving up coding on simpleMud eventhough i think this is a ideal base to learn from especially with mr.Pentons book right beside you. I might try to find old gnu compilers to use for this code. Because i really do not want to give up on it.
or i will try my visual studi0 2003 and see if it works there any better.
because i didn't want to give up on simple mud i bought a cheap for dummies book which hat visual c++ 6 author edition in it. i thought i could just compile it as easy by pressing compile as the readme says but that isn't the case. i get this error. does anyone know how to add the libs in visual c++ 6?
--------------------Konfiguration: SimpleMUD - Win32 Debug--------------------
Kompilierung läuft...
DatabasePointer.cpp
c:\users\frigg\desktop\simplemud\simplemud\entity.h(14) : fatal error C1083: Include-Datei kann nicht geoeffnet werden: 'BasicLib/BasicLib.h': No such file or directory
Enemy.cpp
...
can't add whole error log because of limit of characters
'TransXML.exe': Loaded 'C:\Program Files (x86)\Kaspersky Lab\Kaspersky Internet Security 2011\x64\kloehk.dll', Cannot find or open the PDB file
'TransXML.exe': Loaded 'C:\Program Files (x86)\Kaspersky Lab\Kaspersky Internet Security 2011\x64\sbhook64.dll', Cannot find or open the PDB file
This is the error I am getting while using visual studio ultimate version.
I am unable to load the PDB file from this folder. I do not know why the compiler loads the .dll files from kaspersky folder.
Is there any way to disable this folder from being loaded.
Is there any way I could solve the issue.
no idea because i noticed that the created executable under vs 2010 would only work once after compiling and then starting it. after that you couldn't start it again because when you wanted to log in via telnet you always lost connection and your exe would crash. I got me a cheap for dummies book with the vc++ 6 author compiler in it. Only bad thing is you are not permitted to redistriubte the executable and only use it for yourself not with friends etc from how i understood the license.