 |
Server Help Community forums for Subgame, ASSS, and bots
|
Author |
Message |
Hakaku Server Help Squatter

Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Sat Apr 05, 2008 1:49 am Post subject: Vista & compiling |
 |
|
|
|
Although I haven't really tried compiling since I updated from XP to Vista, I've noticed that I've had some odd problems using Dev-Cpp, one of them being the location of cc1. While I could easily fix that, I still get some errors when compiling things (I tried following this post for a fix, but no luck).
Quote: | Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\mmods\counter\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\mmods\counter\Makefile.win" all
dllwrap.exe --output-def libc_counter.def --implib libc_counter.a ../../../asss-1.4.4/src/main/util.o ../../../source/mod/counter.o -L"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2" -L"C:/Dev-Cpp/lib" --no-export-all-symbols --add-stdcall-alias ../../../asss-1.4.4/windeps/pthreadGC2.dll -o counter.dll
ld: dllcrt2.o: No such file: No such file or directory
dllwrap.exe: no export definition file provided.
Creating one, but that may not be what you want
dllwrap.exe: gcc exited with status 1
make.exe: *** [counter.dll] Error 1
Execution terminated
|
Specifically, on the italicized line, it indicates that it cannot locate "dllcrt2.o". I tried copying it, along with crt2.o, crtbegin.o, and crtend.o, to "C:\Dev-Cpp\mingw32\lib" (they're also located in C:\Dev-Cpp\lib), but without any luck.
I'm not quite sure how to resolve this, any suggestions? |
|
Back to top |
|
 |
Doc Flabby Server Help Squatter

Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Sat Apr 05, 2008 6:11 am Post subject: |
 |
|
|
|
The version of MingW that comes with dev-c++ is really out of date. You need to install the latest version of MingW then tell dev-c++ to use that. This i have been told solves alot of problems... _________________ Rediscover online gaming. Get Subspace | STF The future...prehaps |
|
Back to top |
|
 |
Hakaku Server Help Squatter

Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Sat Apr 05, 2008 2:21 pm Post subject: |
 |
|
|
|
I tried a workaround, which if I placed those four files into the same folder as my project, it would compile. However, the dll didn't compile properly (causing ASSS to shutdown), so I decided to uninstall Dev-C++, then install an updated version of MinGW, reinstall Dev' without MinGW, and then changed the directories and programs in the compiler options to point to the updated version. However, things still don't compile properly, and I get the same problem as before, when I quickfixed the issues:
Quote: | Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\mmods\counter\Makefile.win"
Executing make...
C:\MinGW\bin\mingw32-make.exe -f "C:\Dev-Cpp\mmods\counter\Makefile.win" all
C:\MinGW\bin\dllwrap.exe --output-def libcounter.def --implib libcounter.a ../../../source/mod/counter.o ../../../asss-1.4.4/src/main/util.o -L"C:/MinGW/lib" --no-export-all-symbols --add-stdcall-alias ../../../asss-1.4.4/windeps/pthreadGC2.dll -o counter.dll
C:\MinGW\bin\dllwrap.exe: no export definition file provided.
Creating one, but that may not be what you want
Execution terminated
Compilation successful |
This happens with anything, including nomysql found in the Dev-Cpp guide on the ASSS wiki, which I used to be able to compile a-ok before. |
|
Back to top |
|
 |
Hakaku Server Help Squatter

Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Wed Jul 02, 2008 1:16 pm Post subject: |
 |
|
|
|
Ok, rather than start a new topic (I resolved this issue by updating Dev-C++ and following the original website that I linked in my 1st post), I've got some problems compiling some of Smong's modules, and I'm not quite sure what to make of such errors when compiling things (like 'spree.c' below). This is still following the Dev-C++ guide on the ASSS wiki, am I missing something obvious? It also keeps indicating a problem on line 15 in 'defs.h' (#include "win32compat.h"), if that helps.
Compiler: Default GCC compiler
Building Makefile: "C:\Dev-Cpp\Spree\Makefile.win"
Executing make...
C:\Dev-Cpp\bin\mingw32-make.exe -f "C:\Dev-Cpp\Spree\Makefile.win" all
C:\Dev-Cpp\bin\g++.exe -c ../../AS3/extra/spree.c -o Output/MingW/spree.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/" -I"C:/Dev-Cpp/include/common/wx/msw" -I"C:/Dev-Cpp/include/common/wx/generic" -I"C:/Dev-Cpp/include/common/wx/fl" -I"C:/Dev-Cpp/include/common/wx/gizmos" -I"C:/Dev-Cpp/include/common/wx/html" -I"C:/Dev-Cpp/include/common/wx/mmedia" -I"C:/Dev-Cpp/include/common/wx/net" -I"C:/Dev-Cpp/include/common/wx/ogl" -I"C:/Dev-Cpp/include/common/wx/plot" -I"C:/Dev-Cpp/include/common/wx/protocol" -I"C:/Dev-Cpp/include/common/wx/stc" -I"C:/Dev-Cpp/include/common/wx/svg" -I"C:/Dev-Cpp/include/common/wx/xml" -I"C:/Dev-Cpp/include/common/wx/xrc" -I"C:/Dev-Cpp/include/common/wx" -I"C:/Dev-Cpp/include/common" -I"C:/asss-1.4.4/src" -I"C:/asss-1.4.4/src/include" -I"C:/asss-1.4.4/windeps" -DBUILDING_DLL=1 -fexpensive-optimizations -O3
In file included from C:/asss-1.4.4/src/include/defs.h:200,
from C:/asss-1.4.4/src/include/asss.h:15,
from ../../AS3/extra/spree.c:54:
C:/asss-1.4.4/src/include/win32compat.h:63: error: expected `,' or `...' before "template"
In file included from C:/asss-1.4.4/src/include/asss.h:23,
from ../../AS3/extra/spree.c:54:
C:/asss-1.4.4/src/include/config.h:48: error: conflicting declaration 'typedef struct ConfigHandle*ConfigHandle'
C:/asss-1.4.4/src/include/config.h:48: error: 'struct ConfigHandle' has a previous declaration as `struct ConfigHandle'
../../AS3/extra/spree.c: In function `void PlayerAction(Player*, int, Arena*)':
../../AS3/extra/spree.c:206: error: invalid conversion from `void*' to `pdata*'
../../AS3/extra/spree.c: In function `void Kill(Arena*, Player*, Player*, int, int, int*, int*)':
../../AS3/extra/spree.c:228: error: invalid conversion from `void*' to `pdata*'
../../AS3/extra/spree.c:251: error: invalid conversion from `void*' to `pdata*'
../../AS3/extra/spree.c:283: error: `T_PLAYER' undeclared (first use this function)
../../AS3/extra/spree.c:283: error: (Each undeclared identifier is reported only once for each function it appears in.)
../../AS3/extra/spree.c:294: error: `T_ARENA' undeclared (first use this function)
../../AS3/extra/spree.c: In function `void FreqChange(Player*, int)':
../../AS3/extra/spree.c:305: error: invalid conversion from `void*' to `pdata*'
../../AS3/extra/spree.c: In function `void ShipChange(Player*, int, int)':
../../AS3/extra/spree.c:315: error: invalid conversion from `void*' to `pdata*'
../../AS3/extra/spree.c: In function `void FlagReset(Arena*, int, int)':
../../AS3/extra/spree.c:330: error: invalid conversion from `void*' to `Player*'
../../AS3/extra/spree.c:330: error: invalid conversion from `void*' to `pdata*'
../../AS3/extra/spree.c: In function `void Cspree(const char*, const char*, Player*, const Target*)':
../../AS3/extra/spree.c:354: error: `T_ARENA' undeclared (first use this function)
../../AS3/extra/spree.c:364: error: invalid conversion from `void*' to `Player*'
../../AS3/extra/spree.c:364: error: invalid conversion from `void*' to `pdata*'
../../AS3/extra/spree.c:378: error: invalid conversion from `void*' to `pdata*'
../../AS3/extra/spree.c:383: error: `T_PLAYER' undeclared (first use this function)
../../AS3/extra/spree.c:386: error: invalid conversion from `void*' to `pdata*'
../../AS3/extra/spree.c: At global scope:
../../AS3/extra/spree.c:392: error: external linkage required for symbol 'info_spree' because of 'dllexport' attribute.
../../AS3/extra/spree.c: In function `int MM_spree(int, Imodman*, Arena*)':
../../AS3/extra/spree.c:399: error: invalid conversion from `void*' to `Iplayerdata*'
../../AS3/extra/spree.c:400: error: invalid conversion from `void*' to `Iconfig*'
../../AS3/extra/spree.c:401: error: invalid conversion from `void*' to `Ichat*'
../../AS3/extra/spree.c:402: error: invalid conversion from `void*' to `Icmdman*'
../../AS3/extra/spree.c:403: error: invalid conversion from `void*' to `Iobjects*'
../../AS3/extra/spree.c:425: error: invalid conversion from `void (*)(Player*, int, Arena*)' to `void*'
../../AS3/extra/spree.c:426: error: invalid conversion from `void (*)(Arena*, Player*, Player*, int, int, int*, int*)' to `void*'
../../AS3/extra/spree.c:427: error: invalid conversion from `void (*)(Player*, int)' to `void*'
../../AS3/extra/spree.c:428: error: invalid conversion from `void (*)(Player*, int, int)' to `void*'
../../AS3/extra/spree.c:429: error: invalid conversion from `void (*)(Arena*, int, int)' to `void*'
../../AS3/extra/spree.c:439: error: invalid conversion from `void (*)(Player*, int, Arena*)' to `void*'
../../AS3/extra/spree.c:440: error: invalid conversion from `void (*)(Arena*, Player*, Player*, int, int, int*, int*)' to `void*'
../../AS3/extra/spree.c:441: error: invalid conversion from `void (*)(Player*, int)' to `void*'
../../AS3/extra/spree.c:442: error: invalid conversion from `void (*)(Player*, int, int)' to `void*'
../../AS3/extra/spree.c:443: error: invalid conversion from `void (*)(Arena*, int, int)' to `void*'
C:\Dev-Cpp\bin\mingw32-make.exe: *** [Output/MingW/spree.o] Error 1
Execution terminated |
Any help would be appreciated.
EDIT: And here's win32compat.h (the bolded line is what gets an error)
Quote: | /* dist: public */
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock.h>
#include <limits.h>
#include <malloc.h>
#include <io.h>
#include <windef.h>
#include <wincon.h>
#include <direct.h>
#define EXPORT __declspec(dllexport)
#ifndef NDEBUG
#define inline
#else
#define inline __inline
#endif
#define strcasecmp(a,b) stricmp((a),(b))
#define strncasecmp(a,b,c) strnicmp((a),(b),(c))
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
#ifndef NAME_MAX
#define NAME_MAX 256
#endif
#ifndef snprintf
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#endif
#define usleep(x) Sleep((x)/1000)
#define sleep(x) Sleep((x)*1000)
#define mkdir(a,b) _mkdir(a)
#ifndef alloca
#define alloca _alloca
#define access _access
#endif
#ifndef S_ISDIR
#define S_ISDIR(a) ((a) & _S_IFDIR)
#endif
#ifndef mktemp
#define mktemp(a) _mktemp(a)
#define chdir(a) _chdir(a)
#endif
#ifndef R_OK
#define R_OK 4
#endif
typedef int socklen_t;
#define BROKEN_VSNPRINTF
/* a few things that windows is missing */
const char * strcasestr(const char* haystack, const char* needle);
int mkstemp(char *template);
/* directory listing */
typedef struct DIR DIR;
struct dirent
{
char d_name[NAME_MAX];
};
DIR *opendir(const char *path);
struct dirent *readdir(DIR *dir);
void closedir(DIR *dir);
int inet_aton(char *cp, struct in_addr *pin);
#endif |
|
|
Back to top |
|
 |
tcsoccerman Server Help Squatter
Age:33 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Thu Jul 03, 2008 9:54 am Post subject: |
 |
|
|
|
usually smong's modules come with a .dll already made. just use that one. |
|
Back to top |
|
 |
Hakaku Server Help Squatter

Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Thu Jul 03, 2008 12:05 pm Post subject: |
 |
|
|
|
tcsoccerman wrote: | usually smong's modules come with a .dll already made. just use that one. |
Yes but I don't want to use a precompiled module because then I can't edit and use it. Kind of ruins the point of developping doesn't it? |
|
Back to top |
|
 |
Doc Flabby Server Help Squatter

Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Thu Jul 03, 2008 1:13 pm Post subject: |
 |
|
|
|
try this compiler, its a fork of dev-c++ thats being activly worked on http://wxdsgn.sourceforge.net/
I use it in preference to dev-c++ now as its less buggy |
|
Back to top |
|
 |
Hakaku Server Help Squatter

Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Thu Jul 03, 2008 3:09 pm Post subject: |
 |
|
|
|
Doc Flabby wrote: | try this compiler, its a fork of dev-c++ thats being activly worked on http://wxdsgn.sourceforge.net/
I use it in preference to dev-c++ now as its less buggy |
That's what I'm using (latest build 6.10.2); and that's how my original problem was solved
I think the problem might have to due with the module(s) not being compatible with 1.4.4, since I can get the spree module to compile properly for 1.4.3. Although I really don't understand what major differences there are between the two that would cause this. |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
Software by php BB © php BB Group Server Load: 157 page(s) served in previous 5 minutes.
|