Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 20:00

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 
Author Message
 Post subject: Gslist not compiling
PostPosted: 08 Feb 2009 05:42 

Joined: 28 Jan 2009 03:30
Posts: 17
hello all!
i am trying to compile gslist but it isnt working :S

i am getting the following error:
Code:
C:\Documents and Settings\Owner>"C:\Documents and Settings\Owner\Desktop\gslist\
src\compa.bat"
gcc: gslist_icon.rc: No such file or directory
gcc: warning: `-x c' after last input file has no effect
gcc: no input files
c:\MinGW\bin\windres: no resources
----------
- gslist -
----------
gcc: gslist_icon.o: No such file or directory
gcc: c:\MinGW\lib\stristr.c: No such file or directory
gcc: c:\MinGW\lib\libz.a: No such file or directory
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:1: error: bad value
(generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\enctype1_decoder.c:1: error:
bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\enctype2_decoder.c:1: error:
bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\enctype_shared.c:1: error: ba
d value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c:1: error: bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\gsnatneg.c:1: error: bad value (generic) for -mtune= switch
-------------
- gslistweb -
-------------
gcc: gslist_icon.o: No such file or directory
gcc: c:\MinGW\lib\stristr.c: No such file or directory
gcc: c:\MinGW\lib\libz.a: No such file or directory
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:1: error: bad value
(generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\enctype1_decoder.c:1: error:
bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\enctype2_decoder.c:1: error:
bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\enctype_shared.c:1: error: bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c:1: error: bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\gsnatneg.c:1: error: bad value (generic) for -mtune= switch
-------------
- gslistsql -
-------------
gcc: gslist_icon.o: No such file or directory
gcc: c:\MinGW\lib\stristr.c: No such file or directory
gcc: c:\MinGW\lib\libz.a: No such file or directory
gcc: c:\MinGW\lib\libmysql.lib: No such file or directory
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:1: error: bad value
(generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\enctype1_decoder.c:1: error:
bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\enctype2_decoder.c:1: error:
bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\enctype_shared.c:1: error: bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c:1: error: bad value (generic) for -mtune= switch
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
c:\Documents and Settings\Owner\Desktop\gslist\src\gsnatneg.c:1: error: bad value (generic) for -mtune= switch
Could Not Find C:\Documents and Settings\Owner\gslist_icon.o


This is what i did to the Batch file:
Code:
@echo off

set FILE_PATH=c:\Documents" "and" "Settings\Owner\Desktop\gslist\src\
set GSLIST_MINGW_OPT=-s -O2 -mtune=generic -Wall -Wextra -Wunused -Wshadow -Wno-pointer-sign -Wno-sign-compare -Wno-unused-parameter
set GSLIST_MINGW_PATH=c:\MinGW
set GSLIST_MINGW_LIBS=gslist_icon.o "%GSLIST_MINGW_PATH%\lib\stristr.c" -lGeoIP -DGSWEB "%GSLIST_MINGW_PATH%\lib\libz.a" "%GSLIST_MINGW_PATH%\lib\libws2_32.a"
set GSLIST_FILES= %FILE_PATH%gslist.c %FILE_PATH%enctype1_decoder.c %FILE_PATH%enctype2_decoder.c %FILE_PATH%enctype_shared.c %FILE_PATH%mydownlib.c %FILE_PATH%gsnatneg.c


"%GSLIST_MINGW_PATH%\bin\windres" gslist_icon.rc gslist_icon.o

echo ----------
echo - gslist -
echo ----------
"%GSLIST_MINGW_PATH%\bin\gcc" %GSLIST_MINGW_OPT% -o ...\gslist.exe  %GSLIST_FILES% %GSLIST_MINGW_LIBS%

echo -------------
echo - gslistweb -
echo -------------
"%GSLIST_MINGW_PATH%\bin\gcc" %GSLIST_MINGW_OPT% -o ...\gslistweb.exe %GSLIST_FILES% %GSLIST_MINGW_LIBS% -mwindows -DWINTRAY

echo -------------
echo - gslistsql -
echo -------------
"%GSLIST_MINGW_PATH%\bin\gcc" %GSLIST_MINGW_OPT% -o ...\gslistsql.exe %GSLIST_FILES% %GSLIST_MINGW_LIBS% -DSQL "%GSLIST_MINGW_PATH%\lib\libmysql.lib"

del gslist_icon.o


Any ideas? i have been trying to compile this for a while but have been failing :-(. So i give up and am asking for help.

tnx
astro


Top
 Profile  
 
 
 Post subject: Re: Gslist not compiling
PostPosted: 08 Feb 2009 13:19 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
for calling compa.bat do the following:
cd "\Documents and Settings\Owner\Desktop\gslist\src"
compa.bat

now seems that you don't have the zlib library and stristr.c in c:\mingw\lib (gslistsql will not compile because requires also the sql library but probably you don't need sql support), you can get them from:

http://gnuwin32.sourceforge.net/downlin ... ib-zip.php
http://aluigi.org/mytoolz/stristr.c

the last thing is removing -Wno-pointer-sign and -mtune=generic from compa.bat (probably you have gcc 3.x)


Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 08 Feb 2009 23:42 

Joined: 28 Jan 2009 03:30
Posts: 17
i did wat you said and i got this:

Code:
C:\Documents and Settings\Owner>"C:\Documents and Settings\Owner\Desktop\gslist\
src\compa.bat"
gcc: gslist_icon.rc: No such file or directory
gcc: warning: `-x c' after last input file has no effect
gcc: no input files
c:\MinGW\bin\windres: no resources
----------
- gslist -
----------
gcc: gslist_icon.o: No such file or directory
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:64:19: GeoIP.h: No s
uch file or directory
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:333: error: syntax e
rror before '*' token
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:333: warning: type d
efaults to `int' in declaration of `geoipx'
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:333: warning: data d
efinition has no type or storage class
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:367:
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h: In function `repl
ace':
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h:285: warning: impl
icit declaration of function `stristr'
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:370:
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.h: At top level:
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.h:77: warning: decl
aration of 'timeout' shadows a global declaration
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h:134: warning: shad
owed declaration is here
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:374:
c:\Documents and Settings\Owner\Desktop\gslist\src\show_dump.h: In function `sho
w_dump':
c:\Documents and Settings\Owner\Desktop\gslist\src\show_dump.h:36: warning: `sta
tic' is not at beginning of declaration
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:378:
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h: In function `i
nit_geoip':
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: warning: im
plicit declaration of function `GeoIP_open'
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: error: `GEO
IP_MEMORY_CACHE' undeclared (first use in this function)
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: error: (Eac
h undeclared identifier is reported only once
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: error: for
each function it appears in.)
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: warning: as
signment makes pointer from integer without a cast
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h: In function `g
eneric_query':
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:185: warning: d
eclaration of 'data' shadows a parameter
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:184: warning: s
hadowed declaration is here
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:186: warning: d
eclaration of 'data' shadows a parameter
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:184: warning: s
hadowed declaration is here
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:299: warning: i
mplicit declaration of function `GeoIP_country_code_by_addr'
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h: In function `m
ulti_scan_reply':
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:729: warning: f
ormat argument is not a pointer (arg 4)
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c: In function `myd
own_http2file':
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c:667: warning: imp
licit declaration of function `stristr'
-------------
- gslistweb -
-------------
gcc: gslist_icon.o: No such file or directory
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:64:19: GeoIP.h: No s
uch file or directory
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:333: error: syntax e
rror before '*' token
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:333: warning: type d
efaults to `int' in declaration of `geoipx'
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:333: warning: data d
efinition has no type or storage class
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:367:
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h: In function `repl
ace':
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h:285: warning: impl
icit declaration of function `stristr'
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:370:
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.h: At top level:
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.h:77: warning: decl
aration of 'timeout' shadows a global declaration
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h:134: warning: shad
owed declaration is here
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:374:
c:\Documents and Settings\Owner\Desktop\gslist\src\show_dump.h: In function `sho
w_dump':
c:\Documents and Settings\Owner\Desktop\gslist\src\show_dump.h:36: warning: `sta
tic' is not at beginning of declaration
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:378:
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h: In function `i
nit_geoip':
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: warning: im
plicit declaration of function `GeoIP_open'
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: error: `GEO
IP_MEMORY_CACHE' undeclared (first use in this function)
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: error: (Eac
h undeclared identifier is reported only once
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: error: for
each function it appears in.)
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: warning: as
signment makes pointer from integer without a cast
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h: In function `g
eneric_query':
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:185: warning: d
eclaration of 'data' shadows a parameter
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:184: warning: s
hadowed declaration is here
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:186: warning: d
eclaration of 'data' shadows a parameter
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:184: warning: s
hadowed declaration is here
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:299: warning: i
mplicit declaration of function `GeoIP_country_code_by_addr'
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h: In function `m
ulti_scan_reply':
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:729: warning: f
ormat argument is not a pointer (arg 4)
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c: In function `myd
own_http2file':
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c:667: warning: imp
licit declaration of function `stristr'
-------------
- gslistsql -
-------------
gcc: gslist_icon.o: No such file or directory
gcc: c:\MinGW\lib\libmysql.lib: No such file or directory
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:64:19: GeoIP.h: No s
uch file or directory
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:333: error: syntax e
rror before '*' token
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:333: warning: type d
efaults to `int' in declaration of `geoipx'
c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.c:333: warning: data d
efinition has no type or storage class
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:367:
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h: In function `repl
ace':
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h:285: warning: impl
icit declaration of function `stristr'
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:370:
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.h: At top level:
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.h:77: warning: decl
aration of 'timeout' shadows a global declaration
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h:134: warning: shad
owed declaration is here
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:374:
c:\Documents and Settings\Owner\Desktop\gslist\src\show_dump.h: In function `sho
w_dump':
c:\Documents and Settings\Owner\Desktop\gslist\src\show_dump.h:36: warning: `sta
tic' is not at beginning of declaration
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:376:
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:21:25: mysql/mysql.h:
No such file or directory
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:376:
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h: At top level:
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:30: error: syntax err
or before "dbase"
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:30: warning: type def
aults to `int' in declaration of `dbase'
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:30: warning: data def
inition has no type or storage class
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h: In function `gssql_i
nit':
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:124: warning: implici
t declaration of function `mysql_init'
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:128: warning: implici
t declaration of function `mysql_real_connect'
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:129: warning: implici
t declaration of function `mysql_error'
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:129: warning: format
argument is not a pointer (arg 3)
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h: In function `gssql_l
ater':
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:146: warning: implici
t declaration of function `mysql_real_query'
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:147: warning: format
argument is not a pointer (arg 3)
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:152: warning: implici
t declaration of function `mysql_affected_rows'
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h: In function `gssql_c
lose':
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:164: warning: implici
t declaration of function `mysql_close'
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h: In function `gssql':

c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:192: warning: format
argument is not a pointer (arg 3)
c:\Documents and Settings\Owner\Desktop\gslist\src\gssql.h:207: warning: format
argument is not a pointer (arg 3)
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:378:
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h: In function `i
nit_geoip':
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: warning: im
plicit declaration of function `GeoIP_open'
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: error: `GEO
IP_MEMORY_CACHE' undeclared (first use in this function)
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: error: (Eac
h undeclared identifier is reported only once
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: error: for
each function it appears in.)
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:60: warning: as
signment makes pointer from integer without a cast
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h: In function `g
eneric_query':
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:185: warning: d
eclaration of 'data' shadows a parameter
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:184: warning: s
hadowed declaration is here
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:186: warning: d
eclaration of 'data' shadows a parameter
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:184: warning: s
hadowed declaration is here
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:299: warning: i
mplicit declaration of function `GeoIP_country_code_by_addr'
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h: In function `m
ulti_scan_reply':
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:729: warning: f
ormat argument is not a pointer (arg 4)
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c: In function `myd
own_http2file':
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c:667: warning: imp
licit declaration of function `stristr'
Could Not Find C:\Documents and Settings\Owner\gslist_icon.o


by the way, i have MinGW-5.1.4

Thank you for response.


Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 09 Feb 2009 00:53 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
ops seems that you don't have the geoip library installed... geoip is really boring to compile because the authors have made a bad job with the windows support, luckily the wireshark developers adjusted the situation but there are still some manual modifications required in some cases.

so at this point is probably up to you to choose if you want to try to compile it by yourself using the current CVS http://sourceforge.net/cvs/?group_id=66844 or the version from the Wireshark svn http://anonsvn.wireshark.org/wireshark- ... /packages/

otherwise you can just use the one pre-compiled by me which is exactly the same with which I built the binaries in the latest version of gslist and it's attached to this post.
if the compiler returns errors about -lGeoIP it's enough that you substituite -lGeoIP in compa.bat with the direct links to the libs: c:\mingw\lib\libGeoIP.a c:\mingw\lib\libGeoIPUpdate.a


Attachments:
geoip_145.zip [96 KiB]
Downloaded 115 times
Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 09 Feb 2009 21:11 

Joined: 28 Jan 2009 03:30
Posts: 17
ok, so i used this batch:
Code:
@echo off

set FILE_PATH=c:\Documents" "and" "Settings\Owner\Desktop\gslist\src\
set GSLIST_MINGW_OPT=-s -O2 -Wall -Wextra -Wunused -Wshadow -Wno-sign-compare -Wno-unused-parameter
set GSLIST_MINGW_PATH=c:\MinGW
set GSLIST_MINGW_LIBS=gslist_icon.o "%GSLIST_MINGW_PATH%\lib\stristr.c" %GSLIST_MINGW_PATH%\lib\libGeoIP.a -DGSWEB "%GSLIST_MINGW_PATH%\lib\libz.a" "%GSLIST_MINGW_PATH%\lib\libws2_32.a"
set GSLIST_FILES= %FILE_PATH%gslist.c %FILE_PATH%enctype1_decoder.c %FILE_PATH%enctype2_decoder.c %FILE_PATH%enctype_shared.c %FILE_PATH%mydownlib.c %FILE_PATH%gsnatneg.c


"%GSLIST_MINGW_PATH%\bin\windres" gslist_icon.rc gslist_icon.o

echo ----------
echo - gslist -
echo ----------
"%GSLIST_MINGW_PATH%\bin\gcc" %GSLIST_MINGW_OPT% -o ...\gslist.exe  %GSLIST_FILES% %GSLIST_MINGW_LIBS%

del gslist_icon.o


and it gave me this error:

Code:
C:\Documents and Settings\Owner>"C:\Documents and Settings\Owner\Desktop\gslist\
src\compa.bat"
gcc: gslist_icon.rc: No such file or directory
gcc: warning: `-x c' after last input file has no effect
gcc: no input files
c:\MinGW\bin\windres: no resources
----------
- gslist -
----------
gcc: gslist_icon.o: No such file or directory
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:367:
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h: In function `replace':
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h:285: warning: implicit declaration of function `stristr'
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:370:
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.h: At top level:
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.h:77: warning: declaration of 'timeout' shadows a global declaration
c:\Documents and Settings\Owner\Desktop\gslist\src\gsmyfunc.h:134: warning: shadowed declaration is here
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:374:
c:\Documents and Settings\Owner\Desktop\gslist\src\show_dump.h: In function `show_dump':
c:\Documents and Settings\Owner\Desktop\gslist\src\show_dump.h:36: warning: `static' is not at beginning of declaration
In file included from c:\Documents and Settings\Owner\Desktop\gslist\src\gslist.
c:378:
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h: In function `generic_query':
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:185: warning: declaration of 'data' shadows a parameter
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:184: warning: shadowed declaration is here
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:186: warning: declaration of 'data' shadows a parameter
c:\Documents and Settings\Owner\Desktop\gslist\src\multi_query.h:184: warning: shadowed declaration is here
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c: In function `mydown_http2file':
c:\Documents and Settings\Owner\Desktop\gslist\src\mydownlib.c:667: warning: implicit declaration of function `stristr'
Could Not Find C:\Documents and Settings\Owner\gslist_icon.o


gslist_icon.o did not come with the package o_0 wats up?

and its making a whole bunch of other complains.

tnx


Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 09 Feb 2009 22:47 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
gslist_icon.o is created by windres through the compiling of gslist_icon.rc which windres doesn't find.
try to run compa.bat as I told you in the first post:
Code:
cd "\Documents and Settings\Owner\Desktop\gslist\src"
compa.bat
the rest are only warnings so don't consider them


Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 10 Feb 2009 00:21 

Joined: 28 Jan 2009 03:30
Posts: 17
kick ass! Thank you aluigi. you are the greatest!

b/w just out of curiosity what is the difference in doing it your way and my way?

i mean, i just dragged the file into the console. i don't understand where the difference occurs.

thanks


Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 10 Feb 2009 15:17 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
the difference is that for some reasons windres has searched gslist_icon.rc in the current folder instead of in the one in which is located the bat (that should be considered the current folder when you run it)... enough strange because instead gcc had no problems to find the files, mah


Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 07 Mar 2009 20:25 

Joined: 20 Jul 2008 20:02
Posts: 8
Hello. I am also trying to compile gslist using MinGW, but I get errors similar to those found above.

I installed MinGW using the MinGW-5.1.4.exe install wizard (and I selected "current" version).

I followed the advice above and in the command window I changed the directory to where the compa.bat is located.

This is the contents of the compa (I changed the d:\mingw... to c:\mingw...)

Code:
c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizations -Wall -Wno-pointer-sign -Wunused-function -o gslist.exe gslist.c enctype1_decoder.c enctype2_decoder.c enctype_shared.c mydownlib.c gslist_icon.o c:\mingw\lib\stristr.o -lGeoIP -DGSWEB c:\mingw\lib\libz.a c:\mingw\lib\libws2_32.a

c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizations -Wall -Wno-pointer-sign -Wunused-function -o gslistweb.exe gslist.c enctype1_decoder.c enctype2_decoder.c enctype_shared.c mydownlib.c gslist_icon.o c:\mingw\lib\stristr.o -lGeoIP -DGSWEB -DWINTRAY c:\mingw\lib\libz.a c:\mingw\lib\libws2_32.a

c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizations -Wall -Wno-pointer-sign -Wunused-function -o gslistsql.exe gslist.c enctype1_decoder.c enctype2_decoder.c enctype_shared.c mydownlib.c gslist_icon.o c:\mingw\lib\stristr.o -lGeoIP -DGSWEB -DSQL c:\mingw\lib\libz.a c:\mingw\lib\libws2_32.a c:\mingw\lib\libmysql.lib

pause


And this was the result of trying to run it:

Code:
C:\>cd "C:\under\grams\gslist\src"

C:\under\grams\gslist\src>compa

C:\under\grams\gslist\src>c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizatio
ns -Wall -Wno-pointer-sign -Wunused-function -o gslist.exe gslist.c enctype1_decoder.c enctype2_deco
der.c enctype_shared.c mydownlib.c gslist_icon.o c:\mingw\lib\stristr.o -lGeoIP -DGSWEB c:\mingw\lib
\libz.a c:\mingw\lib\libws2_32.a
gcc: gslist_icon.o: No such file or directory
gcc: c:\mingw\lib\stristr.o: No such file or directory
gcc: c:\mingw\lib\libz.a: No such file or directory
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"

C:\under\grams\gslist\src>c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizatio
ns -Wall -Wno-pointer-sign -Wunused-function -o gslistweb.exe gslist.c enctype1_decoder.c enctype2_d
ecoder.c enctype_shared.c mydownlib.c gslist_icon.o c:\mingw\lib\stristr.o -lGeoIP -DGSWEB -DWINTRAY
c:\mingw\lib\libz.a c:\mingw\lib\libws2_32.a
gcc: gslist_icon.o: No such file or directory
gcc: c:\mingw\lib\stristr.o: No such file or directory
gcc: c:\mingw\lib\libz.a: No such file or directory
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"

C:\under\grams\gslist\src>c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizatio
ns -Wall -Wno-pointer-sign -Wunused-function -o gslistsql.exe gslist.c enctype1_decoder.c enctype2_d
ecoder.c enctype_shared.c mydownlib.c gslist_icon.o c:\mingw\lib\stristr.o -lGeoIP -DGSWEB -DSQL c:\
mingw\lib\libz.a c:\mingw\lib\libws2_32.a c:\mingw\lib\libmysql.lib
gcc: gslist_icon.o: No such file or directory
gcc: c:\mingw\lib\stristr.o: No such file or directory
gcc: c:\mingw\lib\libz.a: No such file or directory
gcc: c:\mingw\lib\libmysql.lib: No such file or directory
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"
cc1.exe: error: unrecognized command line option "-Wno-pointer-sign"


I have not used MinGW before so this is all new to me. Hopefully can see something?


Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 08 Mar 2009 00:43 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
ok, first remove all the occurrencies of -Wno-pointer-sign and gslist_icon.o from the bat file (the first is a gcc option for removing some visual warnings and the second is used only for the icon and the system tray menu in gslistweb.exe which I guess you don't want/need to compile).

then get stristr.c from http://aluigi.org/mytoolz/stristr.c and put it c:\mingw\lib
replace also the occurrencies of stristr.o with stristr.c (or compile it as a .o, it's just the same)

get zlib from http://gnuwin32.sourceforge.net/downlin ... ib-zip.php and unzip it in c:\mingw\lib

if you need also to enable the mysql support (I guess you don't need it) you must get also the mysql dev library.


Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 08 Mar 2009 19:45 

Joined: 20 Jul 2008 20:02
Posts: 8
Ok, I think I am a lot closer, only one error. The gslist.exe modified date hasn't changed, so pretty sure it didn't compile. Here is where I'm at:

- Removed occurences of -Wno-pointer-sign and gslist_icon.o from batch
- Added the file c:\mingw\lib\stristr.c, and updated the batch to match it's extension.
- Added the files from the zlib\include download to my c:\mingw\include directory
- Added the files from the zlib\lib download to my c:\mingw\lib directory
- Added the files from the zlib\manifest download to c:\mingw\manifest directory. (Not sure if I put this in the right directory. I didn't have a 'manifest' directory, but there was a 'man' directory, I wasn't sure if that was the same thing. So like I said I created a manifest directory).
- Removed c:\mingw\lib\libmysql.lib from the batch. (This might be related to error below. You are right, I don't need mySQL, and I didn't see this file in MinGW, so I removed the reference from the batch file).

At this point I tried running the batch, got errors, but they were basically the same as 'GeoIP.h: No such file or directory' above, so then I:
- Downloaded the geoip_145.zip and put the lib files and include files in their respective directories.
- Replaced -lGeoIP with c:\mingw\lib\libGeoIP.a c:\mingw\lib\libGeoIPUpdate.a in the batch.

Here what the batch currently looks like:

Code:
c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizations -Wall -Wunused-function -o gslist.exe gslist.c enctype1_decoder.c enctype2_decoder.c enctype_shared.c mydownlib.c c:\mingw\lib\stristr.c C:\mingw\lib\libGeoIP.a C:\mingw\lib\libGeoIPUpdate.a -DGSWEB c:\mingw\lib\libz.a c:\mingw\lib\libws2_32.a

c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizations -Wall -Wunused-function -o gslistweb.exe gslist.c enctype1_decoder.c enctype2_decoder.c enctype_shared.c mydownlib.c c:\mingw\lib\stristr.c C:\mingw\lib\libGeoIP.a C:\mingw\lib\libGeoIPUpdate.a -DGSWEB -DWINTRAY c:\mingw\lib\libz.a c:\mingw\lib\libws2_32.a

c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizations -Wall -Wunused-function -o gslistsql.exe gslist.c enctype1_decoder.c enctype2_decoder.c enctype_shared.c mydownlib.c c:\mingw\lib\stristr.c C:\mingw\lib\libGeoIP.a C:\mingw\lib\libGeoIPUpdate.a -DGSWEB -DSQL c:\mingw\lib\libz.a c:\mingw\lib\libws2_32.a


And here is the result:

Code:
C:\under\grams\gslist\src>c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizatio
ns -Wall -Wunused-function -o gslist.exe gslist.c enctype1_decoder.c enctype2_decoder.c enctype_shar
ed.c mydownlib.c c:\mingw\lib\stristr.c C:\mingw\lib\libGeoIP.a C:\mingw\lib\libGeoIPUpdate.a -DGSWE
B c:\mingw\lib\libz.a c:\mingw\lib\libws2_32.a
In file included from gslist.c:348:
gsmyfunc.h: In function `replace':
gsmyfunc.h:389: warning: implicit declaration of function `stristr'
mydownlib.c: In function `mydown_http2file':
mydownlib.c:666: warning: implicit declaration of function `stristr'

C:\under\grams\gslist\src>c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizatio
ns -Wall -Wunused-function -o gslistweb.exe gslist.c enctype1_decoder.c enctype2_decoder.c enctype_s
hared.c mydownlib.c c:\mingw\lib\stristr.c C:\mingw\lib\libGeoIP.a C:\mingw\lib\libGeoIPUpdate.a -DG
SWEB -DWINTRAY c:\mingw\lib\libz.a c:\mingw\lib\libws2_32.a
In file included from gslist.c:348:
gsmyfunc.h: In function `replace':
gsmyfunc.h:389: warning: implicit declaration of function `stristr'
mydownlib.c: In function `mydown_http2file':
mydownlib.c:666: warning: implicit declaration of function `stristr'

C:\under\grams\gslist\src>c:\mingw\bin\gcc -s -O2 -masm=intel -mtune=pentium -fexpensive-optimizatio
ns -Wall -Wunused-function -o gslistsql.exe gslist.c enctype1_decoder.c enctype2_decoder.c enctype_s
hared.c mydownlib.c c:\mingw\lib\stristr.c C:\mingw\lib\libGeoIP.a C:\mingw\lib\libGeoIPUpdate.a -DG
SWEB -DSQL c:\mingw\lib\libz.a c:\mingw\lib\libws2_32.a
In file included from gslist.c:348:
gsmyfunc.h: In function `replace':
gsmyfunc.h:389: warning: implicit declaration of function `stristr'
In file included from gslist.c:359:
gssql.h:21:25: mysql/mysql.h: No such file or directory
In file included from gslist.c:359:
gssql.h: At top level:
gssql.h:30: error: syntax error before "dbase"
gssql.h:30: warning: type defaults to `int' in declaration of `dbase'
gssql.h:30: warning: data definition has no type or storage class
gssql.h: In function `gssql_init':
gssql.h:121: warning: implicit declaration of function `mysql_init'
gssql.h:125: warning: implicit declaration of function `mysql_real_connect'
gssql.h:126: warning: implicit declaration of function `mysql_error'
gssql.h:126: warning: format argument is not a pointer (arg 3)
gssql.h: In function `gssql_later':
gssql.h:143: warning: implicit declaration of function `mysql_real_query'
gssql.h:144: warning: format argument is not a pointer (arg 3)
gssql.h:149: warning: implicit declaration of function `mysql_affected_rows'
gssql.h: In function `gssql_close':
gssql.h:161: warning: implicit declaration of function `mysql_close'
gssql.h: In function `gssql':
gssql.h:189: warning: format argument is not a pointer (arg 3)
gssql.h:204: warning: format argument is not a pointer (arg 3)
mydownlib.c: In function `mydown_http2file':
mydownlib.c:666: warning: implicit declaration of function `stristr'


Do I need to compile with mySQL even though I don't need it? If I do need it, could you post a link where I could download it?

Thankyou.


Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 09 Mar 2009 00:03 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
ok, now your gslist.exe is compiled correctly so check the new executable in the src folder.

gslistweb.exe has compiled too but probably will not work due to the lack of gslist_icon.o and gslistsql.exe obviously has been not compiled because there is no mysql library.

so your gslist.exe is ready and working, that's all you need.

a side note: seems that you have an old version of gslist because the latest one adopts a better compa.bat file which is more clear to modify.


Top
 Profile  
 
 Post subject: Re: Gslist not compiling
PostPosted: 09 Mar 2009 03:38 

Joined: 20 Jul 2008 20:02
Posts: 8
Yes you are correct, it has compiled a new version. I didn't think to look in the src folder, I thought it would overwrite the existing one.

I do have an older gslist, I tried translating it 6 months ago, I'm trying to find some time to work on it again.

Thankyou very much for your help. And I most likely will be back :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: