[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  PennMUSH
. -> [Folder]  Compiling the server
. . -> [Subject]  Windows Compiling Error

Windows Compiling Error

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Ziggy   USA  (6 posts)  [Biography] bio
Date Mon 16 Mar 2009 02:57 AM (UTC)
Message
First, a little info on what I'm using, incase it matters.

Windows Vista 64-bit Ultimate Edition, a clean install on a fresh hard drive, not store-bought/factory-installed.

Microsoft Visual Studios C++ .NET 2003

PennMUSH source 1.8.3p9

I stayed up all night reading over every read-me, install, and manual file I could find/download, and felt satisfied that I could manage with the above.

So I move files to the folders as instructed, create and copy information between files as instructed, open the project and double-check to make sure everything is in order.

Click to Build PennMUSH.

...And hit an error.

The problem entirely seems to be that Win32 needs size_t to be defined, as stated in confmagic.h, and I lack the file where it's apparently defined.

So, I'm lacking crtdefs.h, and have not been able to find any way around this. I played around and commented it out just to see if that might work, but it created a bunch of inconsistency errors.

Any help on where to find crtdefs.h or create a file that does what it needs in its place would be appreciated. Nothing else seems to be wrong with the set-up, as yet.
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 16 Mar 2009 05:40 AM (UTC)
Message
Quote:

Click to Build PennMUSH.

...And hit an error.


Can you paste the error(s)?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Ziggy   USA  (6 posts)  [Biography] bio
Date Reply #2 on Mon 16 Mar 2009 06:27 AM (UTC)
Message
Yeah, sorry about that. I'm using a different machine to browse here so I didn't have a copy-and-paste immediately on hand. Fixed that.

When I do a simple compile:

Compiling...
wiz.c
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\confmagic.h(42) : fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory

Build log was saved at "file://c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\BuildLog.htm"
pennmush - 1 error(s), 0 warning(s)


And when I do a full build, it's the same thing, only it goes through every file and gives the same error for every one of them for something like 72 errors or so. Same one each time, of course.
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Mon 16 Mar 2009 07:03 AM (UTC)
Message
Based on a bit of a Google on your file name and PennMUSH, I suggest you could try making a file called crtdefs.h, and put in it:


#include stddef.h



- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Ziggy   USA  (6 posts)  [Biography] bio
Date Reply #4 on Mon 16 Mar 2009 07:08 AM (UTC)
Message
Thanks. I'll try that then and see how it works. If not, the worst I can expect is another error and to be back in the morning.

Much appreciated either way. Thank you so much. :)
[Go to top] top

Posted by Ziggy   USA  (6 posts)  [Biography] bio
Date Reply #5 on Mon 16 Mar 2009 06:18 PM (UTC)
Message
Got a few more errors. Might be able to work something out later. I'll google when I have the time and maybe browse a bit more, though any help will still be appreciated. :)


Most of the errors go something like this:

c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\externs.h(452) : warning C4273: 'strdup' : inconsistent dll linkage
warnings.c
c:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\stdlib.h(256) : error C2375: 'Win32_Exit' : redefinition; different linkage
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\compile.h(56) : see declaration of 'Win32_Exit'
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\externs.h(452) : warning C4273: 'strdup' : inconsistent dll linkage
version.c
c:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\stdlib.h(256) : error C2375: 'Win32_Exit' : redefinition; different linkage
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\compile.h(56) : see declaration of 'Win32_Exit'
utils.c
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\externs.h(452) : warning C4273: 'strdup' : inconsistent dll linkage
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\SFMT.h(39) : warning C4114: same type qualifier used more than once
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\SFMT.h(39) : error C2632: 'int' followed by 'int' is illegal
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\SFMT.h(39) : warning C4091: 'typedef ' : ignored on left of 'unsigned int' when no variable is declared
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\SFMT.h(40) : warning C4114: same type qualifier used more than once
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\SFMT.h(40) : error C2632: '__int64' followed by '__int64' is illegal
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\SFMT.h(40) : warning C4091: 'typedef ' : ignored on left of 'unsigned __int64' when no variable is declared
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\utils.c(615) : error C2065: 'UINT32_MAX' : undeclared identifier
unparse.c
c:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\include\stdlib.h(256) : error C2375: 'Win32_Exit' : redefinition; different linkage
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\compile.h(56) : see declaration of 'Win32_Exit'
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\externs.h(452) : warning C4273: 'strdup' : inconsistent dll linkage
timer.c
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\externs.h(452) : warning C4273: 'strdup' : inconsistent dll linkage
strutil.c
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\externs.h(452) : warning C4273: 'strdup' : inconsistent dll linkage
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\strutil.c(91) : warning C4013: '_vsnprintf_s' undefined; assuming extern returning int
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\strutil.c(91) : error C2065: '_TRUNCATE' : undeclared identifier
strtree.c
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\externs.h(452) : warning C4273: 'strdup' : inconsistent dll linkage


I've also got:

linkage
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\mysocket.c(322) : error C2065: 'EADDRINUSE' : undeclared identifier


extchat.c
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\hdrs\externs.h(452) : warning C4273: 'strdup' : inconsistent dll linkage
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\extchat.c(3434) : error C2143: syntax error : missing ';' before 'const'
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\extchat.c(3435) : error C2143: syntax error : missing ';' before 'type'
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\extchat.c(3436) : error C2065: 'wenv' : undeclared identifier
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\extchat.c(3436) : warning C4022: 'memset' : pointer mismatch for actual parameter 1
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\extchat.c(3437) : error C2065: 'i' : undeclared identifier
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\extchat.c(3438) : error C2109: subscript requires array or pointer type
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\extchat.c(3441) : warning C4047: 'function' : 'const char ** ' differs in levels of indirection from 'int'
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\extchat.c(3488) : error C2143: syntax error : missing ';' before 'type'
c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\extchat.c(3547) : error C2065: 'override_chatformat' : undeclared identifier


c:\Users\SilverBullet\Documents\Visual Studio Projects\pennmush-1.8.3p9\src\command.c(806) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data


c:\users\silverbullet\documents\visual studio projects\pennmush-1.8.3p9\src\bsd.c(668) : warning C4715: 'mainthread' : not all control paths return a value


[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Mon 16 Mar 2009 08:08 PM (UTC)
Message
Different linkage? Sounds like a single setting would fix all that (can't say what is is offhand). Why not just use Cygwin rather than mucking around with Visual Studio? It will probably compile clean the first time then. ;)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Ziggy   USA  (6 posts)  [Biography] bio
Date Reply #7 on Mon 16 Mar 2009 08:36 PM (UTC)
Message
I tried it sometime in the past and didn't have much luck figuring it out. I've used Visual Studio before to successfully compile a Dawn of Time codebase. Just somewhere I hit a snag here.

I'll grab the latest Cygwin release and give it another try shortly. Thanks again. :)
[Go to top] top

Posted by Ziggy   USA  (6 posts)  [Biography] bio
Date Reply #8 on Tue 17 Mar 2009 02:44 AM (UTC)
Message
Well, since I have to use a different comp to connect than I do to build with, Cygwin is looking like a no-go since I can't find anything small enough to download that installs right from the executable as opposed from downloading what it deems necessary.

I'll just keep working. I've been playing around some and most of the problems seem to occur when I don't have the right .c or .h file in the top-level Pennmush directory. Most of them (except crtdefs.h) seem available from my Visual Studio install, so with some luck and patience I should be able to dig my way through.

If nothing else, I can just play around softcoding the precompiled 1.8.3p6 binary until I get this taken care of.

Thanks a lot. You've been very helpful. Before I was just frustrated but now I'm feeling much more hopeful about this. :)
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


25,117 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]