Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ Compile swfote 2.1.5 OSX Mavericks
Compile swfote 2.1.5 OSX Mavericks
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| MattJ820
(32 posts) Bio
|
Date
| Mon 30 Mar 2015 05:43 PM (UTC) Amended on Mon 30 Mar 2015 07:01 PM (UTC) by MattJ820
|
Message
| Hello,
I'm having problems getting swfote to compile using OSX Mavericks, which I believe I've concluded after my research compiles with C99. (Forgive me if I'm wrong)
Aside from Warnings which I believe I can fix, I'm getting an error out of mud.c for the following
typedef unsigned char bool - cannot combine with previous argument char.
After looking this up on the net, I believe the issue is that C99 doesn't like "bool" and wants me to use _Bool. I have tried rephrasing it to typedef _Bool Boolean and then replacing every instance of bool with _Bool, but that isn't working. I also tried including stdbool.h after I found that online, but that didn't work either.
Any suggestions to get this working? Also, is there a way to make the compiler reference a different version that doesn't conflict with the usage of bool instead?
I read online about doing gcc - std c90 in the makefile or something to that effect but it didn't work and I'm not confident I did it right. I used to code back in high school and I recall swfote compiling perfectly straight out of the box on my old system running Cygwin on a Windows XP machine. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Mon 30 Mar 2015 08:59 PM (UTC) |
Message
| I thought it would C rather than C99.
Quote:
typedef unsigned char bool - cannot combine with previous argument char.
Do you have other typedefs for bool? Try omitting that line altogether. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| MattJ820
(32 posts) Bio
|
Date
| Reply #2 on Mon 30 Mar 2015 10:19 PM (UTC) Amended on Mon 30 Mar 2015 10:46 PM (UTC) by MattJ820
|
Message
| Ya, I actually found an example on this site where someone had success commenting out that line with a dragon ball version of smuag. I didn't have any luck with it though. When I did that, I got an error from just about every C file about bool being undefined.
The errors would go on and on but the compiler stops at mud.h
.h:179:9: error: unknown type name 'bool'
typedef bool SPEC_FUN args( ( CHAR_DATA *ch ) );
^
./mud.h:560:5: error: unknown type name 'bool'
bool can_compress;
^
./mud.h:571:5: error: unknown type name 'bool'
bool fcommand;
^
./mud.h:840:5: error: unknown type name 'bool'
bool triggered;
^
./mud.h:860:2: error: unknown type name 'bool'
bool ifstate[MAX_IFS][DO_ELSE];
^
./mud.h:868:2: error: unknown type name 'bool'
bool single_step;
^
./mud.h:872:1: error: unknown type name 'bool'
bool MOBtrigger;
^
./mud.h:958:5: error: unknown type name 'bool'
bool flags; | Top |
|
Posted by
| MattJ820
(32 posts) Bio
|
Date
| Reply #3 on Mon 30 Mar 2015 10:52 PM (UTC) |
Message
| I commented out the typedef line and #include <stdbool.h> and mud.c seemed to go through ok. I think I have to do the same with all the other C files that reference bool.
Hope this works.. | Top |
|
Posted by
| MattJ820
(32 posts) Bio
|
Date
| Reply #4 on Mon 30 Mar 2015 11:39 PM (UTC) |
Message
| I don't think it likes my 64 bit processor. Either that or I don't know what I'm talking about, which is possible. Any advice?
Other than that I fixed the typedef issue with bool and using the #include
Undefined symbols for architecture x86_64:
"xport-dynamic", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [swr] Error 1
make: *** [all] Error 2 | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #5 on Tue 31 Mar 2015 02:15 AM (UTC) |
Message
| You might be able to tweak something in the Makefile to get that to compile/link.
Sounds like something to do with dynamic linking. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| MattJ820
(32 posts) Bio
|
Date
| Reply #6 on Fri 03 Apr 2015 01:20 AM (UTC) |
Message
| Thank you for the pointer Nick.
Just to summarize for people who might be looking for the complete resolution..you need to do the following to run swfote2.1.5 for OSX.
In mud.h, #include <stdbool.h> at the top, comment out "typedef unsigned char bool;
In the make file, comment out NEED_DL = -ldl with a #. Also, find $(CC) -o $(SWR) $(O_FILES) $(L_FLAGS) -lm and take out the last part -lcrypt.
I had a ton of warnings but it compiled just fine without errors. | 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.
21,610 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top