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
➜ compiling server in Bloodshed c++
|
compiling server in Bloodshed c++
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
| Posted by
| Darisan
(57 posts) Bio
|
| Date
| Sat 19 Apr 2003 02:15 AM (UTC) |
| Message
| | Hey, I'm just wondering if you can compile the server in a compiler like Bloodshed Dev c/c++ or something like that? Does it have to be compiled with 'make' and cygwin and such? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 20 Apr 2003 11:23 AM (UTC) |
| Message
| | The SMAUG server is basically standard C. Provided your compiler supports that, it should compile, however you may have issues with include files not in the place the compiler expects them to be. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Thu 24 Apr 2003 04:50 AM (UTC) |
| Message
| | Don't know - I don't have that compiler. I suggest reading the instructions that came with it. Try compiling a small program first to get the hang of it. Basically you probably need to create a project or whatever they call it, and add most or all of the .C files into it, and then compile. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Darisan
(57 posts) Bio
|
| Date
| Reply #4 on Sat 26 Apr 2003 04:39 AM (UTC) |
| Message
| oh... thats not hard lol
| | Top |
|
| Posted by
| Seifz
(24 posts) Bio
|
| Date
| Reply #5 on Sat 17 Jan 2004 02:58 AM (UTC) |
| Message
| I am trying to compile the Windows version of SMAUG in Bloodshed Dev-C++ using gcc and I keep getting a lot of errors. There appear to be five missing .o files (misc.o, save.o, router.o, webclient.o, and webserver.o). Any idea what's wrong or how I could fix it?
Note: I've added every .c and .h file to the project and even tried compiling with a new makefile. I still get those five missing files. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #6 on Sat 17 Jan 2004 03:26 AM (UTC) |
| Message
| After doing a compile in Cygwin, I find I have the files misc.o and save.o, but not router.o, webclient.o, and webserver.o.
I presume they are for stand-alone applications.
The files misc.o and save.o are not there presumably because of a compile error. Did they compile OK? Did they seem to attempt to compile? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Samson
USA (683 posts) Bio
|
| Date
| Reply #7 on Sat 17 Jan 2004 04:16 AM (UTC) |
| Message
| | router.o, webclient.o, and webserver.o are all part of the IMC2 code and can be ignored. Just don't add them to your project file. It may be a good idea to use the FUSS package since it has been updated and bugfixed for alot of these kinds of things. | | Top |
|
| Posted by
| Seifz
(24 posts) Bio
|
| Date
| Reply #8 on Sat 17 Jan 2004 05:04 AM (UTC) |
| Message
| I deleted all of the IMC/ICE things and then fixed two simple errors. Now, I'm getting 0 compiling errors and there aren't any files missing. However, there are still a ton of linking errors that look like this:
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\comm.o: In function `mainthread':
//c/smaug2/smaug/comm.c:260: undefined reference to `WSAStartup@8'
//c/smaug2/smaug/comm.c:296: undefined reference to `gethostname@8'
//c/smaug2/smaug/comm.c:315: undefined reference to `closesocket@4'
//c/smaug2/smaug/comm.c:316: undefined reference to `closesocket@4'
//c/smaug2/smaug/comm.c:317: undefined reference to `closesocket@4'
//c/smaug2/smaug/comm.c:318: undefined reference to `closesocket@4'
//c/smaug2/smaug/comm.c:335: undefined reference to `WSACleanup@0'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\comm.o: In function `init_socket':
//c/smaug2/smaug/comm.c:356: undefined reference to `gethostname@8'
//c/smaug2/smaug/comm.c:359: undefined reference to `socket@12'
//c/smaug2/smaug/comm.c:365: undefined reference to `setsockopt@20'
//c/smaug2/smaug/comm.c:369: undefined reference to `closesocket@4'
//c/smaug2/smaug/comm.c:380: undefined reference to `setsockopt@20'
//c/smaug2/smaug/comm.c:384: undefined reference to `closesocket@4'
//c/smaug2/smaug/comm.c:392: undefined reference to `htons@4'
//c/smaug2/smaug/comm.c:394: undefined reference to `bind@12'
//c/smaug2/smaug/comm.c:397: undefined reference to `closesocket@4'
//c/smaug2/smaug/comm.c:401: undefined reference to `listen@8'
//c/smaug2/smaug/comm.c:404: undefined reference to `closesocket@4'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\comm.o: In function `check_bad_desc':
//c/smaug2/smaug/comm.c:451: undefined reference to `__WSAFDIsSet@8'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\comm.o: In function `accept_new':
//c/smaug2/smaug/comm.c:530: undefined reference to `select@20'
//c/smaug2/smaug/comm.c:536: undefined reference to `__WSAFDIsSet@8'
//c/smaug2/smaug/comm.c:543: undefined reference to `__WSAFDIsSet@8'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\comm.o: In function `game_loop':
//c/smaug2/smaug/comm.c:590: undefined reference to `__WSAFDIsSet@8'
//c/smaug2/smaug/comm.c:617: undefined reference to `__WSAFDIsSet@8'
//c/smaug2/smaug/comm.c:696: undefined reference to `__WSAFDIsSet@8'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\comm.o: In function `new_descriptor':
//c/smaug2/smaug/comm.c:811: undefined reference to `accept@12'
//c/smaug2/smaug/comm.c:832: undefined reference to `ioctlsocket@12'
//c/smaug2/smaug/comm.c:852: undefined reference to `ntohs@4'
//c/smaug2/smaug/comm.c:859: undefined reference to `inet_ntoa@4'
//c/smaug2/smaug/comm.c:867: undefined reference to `gethostbyaddr@12'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\comm.o: In function `free_desc':
//c/smaug2/smaug/comm.c:933: undefined reference to `closesocket@4'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\comm.o: In function `read_from_descriptor':
//c/smaug2/smaug/comm.c:1095: undefined reference to `recv@16'
//c/smaug2/smaug/comm.c:1098: undefined reference to `WSAGetLastError@0'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\comm.o: In function `write_to_descriptor':
//c/smaug2/smaug/comm.c:1416: undefined reference to `send@16'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\ident.o: In function `auth_check':
//c/smaug2/smaug/ident.c:86: undefined reference to `__WSAFDIsSet@8'
//c/smaug2/smaug/ident.c:96: undefined reference to `__WSAFDIsSet@8'
//c/smaug2/smaug/ident.c:104: undefined reference to `__WSAFDIsSet@8'
//c/smaug2/smaug/ident.c:112: undefined reference to `closesocket@4'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\ident.o: In function `auth_read':
//c/smaug2/smaug/ident.c:155: undefined reference to `recv@16'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\ident.o: In function `auth_write':
//c/smaug2/smaug/ident.c:194: undefined reference to `ntohs@4'
//c/smaug2/smaug/ident.c:194: undefined reference to `ntohs@4'
//c/smaug2/smaug/ident.c:196: undefined reference to `send@16'
//c/smaug2/smaug/ident.c:210: undefined reference to `closesocket@4'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\ident.o: In function `auth_open':
//c/smaug2/smaug/ident.c:234: undefined reference to `socket@12'
//c/smaug2/smaug/ident.c:252: undefined reference to `ioctlsocket@12'
//c/smaug2/smaug/ident.c:264: undefined reference to `getservbyname@8'
//c/smaug2/smaug/ident.c:267: undefined reference to `htons@4'
//c/smaug2/smaug/ident.c:274: undefined reference to `connect@12'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\ident.o: In function `set_auth':
//c/smaug2/smaug/ident.c:319: undefined reference to `getsockname@12'
//c/smaug2/smaug/ident.c:324: undefined reference to `getpeername@12'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\ident.o: In function `kill_auth':
//c/smaug2/smaug/ident.c:349: undefined reference to `closesocket@4'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\save.o: In function `kill_timer':
//c/smaug2/smaug/save.c:78: undefined reference to `timeKillEvent'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\save.o: In function `set_alarm':
//c/smaug2/smaug/save.c:2129: undefined reference to `timeSetEvent'
I did add:
#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "wsock32.lib")
#pragma comment(lib, "advapi32.lib")
to comm.c as suggested, but still no go. Anything else I can try? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #9 on Sat 17 Jan 2004 05:38 AM (UTC) |
| Message
| | Those particular pragma directives are specific to the Microsoft compiler. I suggest you find how to link in those libraries to your Bloodshed compiler. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Seifz
(24 posts) Bio
|
| Date
| Reply #10 on Sat 17 Jan 2004 05:47 AM (UTC) |
| Message
| Almost there! I managed to include those three libraries in Bloodshed and it solved just about every problem except for this:
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\save.o: In function `kill_timer':
//c/smaug2/smaug/save.c:78: undefined reference to `timeKillEvent'
c:\documents and settings\beth.bethscomputer\my documents\my downloads\code\save.o: In function `set_alarm':
//c/smaug2/smaug/save.c:2129: undefined reference to `timeSetEvent'
Any idea which library I would need for those? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #11 on Sat 17 Jan 2004 06:34 AM (UTC) |
| Message
| From the MSDN documentation:
timeKillEvent
The timeKillEvent function cancels a specified timer event.
MMRESULT timeKillEvent(
UINT uTimerID
);
Parameters
uTimerID
Identifier of the timer event to cancel. This identifier was returned by the timeSetEvent function when the timer event was set up.
Return Values
Returns TIMERR_NOERROR if successful or MMSYSERR_INVALPARAM if the specified timer event does not exist.
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mmsystem.h.
Import Library: Use winmm.lib.
The short answer is winmm.lib.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Seifz
(24 posts) Bio
|
| Date
| Reply #12 on Sat 17 Jan 2004 07:17 AM (UTC) |
| Message
| I definitely have that library linked... Still, I get those two linking errors. I tried to include the header they were defined in, mmsystem.h, but that had like... 37 errors, so I took it out. I then found the two functions and copied those into save.c - It still won't work. It says that there is a parse error before 'LPTIMECALLBACK' I put these lines under #define SAVEVERSION 3
timeSetEvent(UINT,UINT,LPTIMECALLBACK,DWORD,UINT);
timeKillEvent(UINT);
What's the parse error? And, still, I'm getting those two link errors. What's up? | | Top |
|
| Posted by
| Seifz
(24 posts) Bio
|
| Date
| Reply #13 on Sat 17 Jan 2004 07:53 AM (UTC) |
| Message
| Okay, I took out those two lines and added these:
timeKillEvent(
UINT uTimerID
);
timeSetEvent(
UINT uDelay,
UINT uResolution,
LPTIMECALLBACK lpTimeProc,
DWORD_PTR dwUser,
UINT fuEvent
);
Now, I still get the parse error before LPTIMECALLBACK. I also get 'TIME_PERIODIC undeclared' when I try to compile. And, of course, those two fun link errors. Do you have any other ideas?
As a note, I include "windows.h" because the MSDN for timeSetEvent said to do so. | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #14 on Sat 17 Jan 2004 09:15 AM (UTC) |
| Message
| Are you sure you're actually linking the libraries? I don't think "#pragma comment" actually links anything - if it does, the name comment is very poorly chosen!
I'm also surprised you're making it to the link phase, if you have parse errors.
Could you post exactly what the parse error is?
You may have to define WIN32 before including windows.h for everything to work properly. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | 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.
67,088 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top