Board logo

標題: 编译gmsv错误 [打印本頁]

作者: 囡囡    時間: 2012-10-28 05:51     標題: 编译gmsv错误

[root@localhost ~]# cd sa/gmsv
[root@localhost gmsv]# dir
autil.c        genver.h      log.c            makegmsv      object.c
battle         genver.sh     ls2data.dat      map           saacproto_cli.c
buf.c          handletime.c  ls2data.h        mclient.c     saacproto_util.c
callfromac.c   include       lssproto_serv.c  msignal.c     setup.cf
callfromcli.c  init.c        lssproto_util.c  net.c         util.c
char           item          magic            npc
configfile.c   link.c        main.c           npcserver.c
function.c     log           Makefile         npcshandle.c
[root@localhost gmsv]# make clean
make[1]: Entering directory `/root/sa/gmsv/char'
rm -f libchar.a
rm -f char_base.o char.o char_event.o char_data.o skill.o title.o addressbook.o chatmagic.o event.o char_walk.o encount.o pet.o enemy.o pet_event.o char_talk.o char_party.o char_item.o deathcontend.o chatroom.o petmail.o trade.o family.o defend.o char_angel.o
rm -f *~
make[1]: Leaving directory `/root/sa/gmsv/char'
make[1]: Entering directory `/root/sa/gmsv/npc'
rm -f libnpc.a
rm -f readnpc.o npcgen.o npctemplate.o npccreate.o npcutil.o npc_warp.o npc_townpeople.o npc_msg.o npc_healer.o npc_oldman.o npc_storyteller.o npc_dengon.o npc_doorman.o npc_npcenemy.o npc_itemchange.o npc_action.o npc_windowman.o npc_savepoint.o npc_windowhealer.o npc_itemshop.o npc_sysinfo.o npc_duelranking.o npc_petskillshop.o npc_petshop.o npc_signboard.o npc_warpman.o npc_exchangeman.o npc_timeman.o npc_bodylan.o npc_mic.o npc_luckyman.o npc_bus.o npc_charm.o npc_quiz.o npc_poolitemshop.o npc_checkman.o npc_janken.o npc_transmigration.o npc_makepair.o npc_familyman.o npc_fmdengon.o npc_fmwarpman.o npc_fmhealer.o npc_bankman.o npc_fmpkman.o npc_airplane.o npc_scheduleman.o npc_fmpkcallman.o npc_manorsman.o npc_riderman.o npc_fmletter.o npc_petmaker.o npc_gamblemaster.o npc_gambleroulette.o npc_petfusion.o npc_stoneserviceman.o npc_newnpcman.o npc_gamblebank.o npc_petracemaster.o npc_petracepet.o npc_bigsmallmaster.o npc_bigsmallpet.o npc_auctioneer.o npc_freepetskillshop.o npc_eventaction.o npc_mtradenpcman.o npc_blackmarket.o npc_transerman.o npc_pauctionman.o npc_alldoman.o npc_sellsthman.o npc_welfare.o npc_verywelfare.o npc_welfare2.o npc_memberman.o npc_raceman.o
rm -f *~
make[1]: Leaving directory `/root/sa/gmsv/npc'
make[1]: Entering directory `/root/sa/gmsv/map'
rm -f libmap.a
rm -f readmap.o map_deal.o map_util.o map_warppoint.o
rm -f *~
make[1]: Leaving directory `/root/sa/gmsv/map'
make[1]: Entering directory `/root/sa/gmsv/item'
rm -f libitem.a
rm -f item.o item_event.o item_gen.o item_trade.o item_contract.o
rm -f *~
make[1]: Leaving directory `/root/sa/gmsv/item'
make[1]: Entering directory `/root/sa/gmsv/battle'
rm -f libbattle.a
rm -f battle.o battle_event.o battle_command.o battle_ai.o battle_magic.o pet_skill.o battle_item.o profession_skill.o
rm -f *~
make[1]: Leaving directory `/root/sa/gmsv/battle'
make[1]: Entering directory `/root/sa/gmsv/magic'
rm -f libmagic.a
rm -f magic.o magic_base.o magic_field.o
rm -f *~
make[1]: Leaving directory `/root/sa/gmsv/magic'
rm -f gmsv
rm -f main.o init.o configfile.o util.o net.o buf.o msignal.o link.o mclient.o callfromac.o callfromcli.o object.o handletime.o function.o log.o npcserver.o autil.o npcshandle.o saacproto_cli.o saacproto_util.o lssproto_serv.o lssproto_util.o
rm -f *~
[root@localhost gmsv]# make depend
make[1]: Entering directory `/root/sa/gmsv/char'
mv Makefile Makefile.bak
sed -ne '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak>Makefile
gcc -I.. -I../include -M char_base.c char.c char_event.c char_data.c skill.c title.c addressbook.c chatmagic.c event.c char_walk.c encount.c pet.c enemy.c pet_event.c char_talk.c char_party.c char_item.c deathcontend.c chatroom.c petmail.c trade.c family.c defend.c char_angel.c >> Makefile
^[[A^[make[1]: Leaving directory `/root/sa/gmsv/char'
make[1]: Entering directory `/root/sa/gmsv/npc'
mv Makefile Makefile.bak
sed -ne '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak>Makefile
gcc -I. -I../include -M readnpc.c npcgen.c npctemplate.c npccreate.c npcutil.c npc_warp.c npc_townpeople.c npc_msg.c npc_healer.c npc_oldman.c npc_storyteller.c npc_dengon.c npc_doorman.c npc_npcenemy.c npc_itemchange.c npc_action.c npc_windowman.c npc_savepoint.c npc_windowhealer.c npc_itemshop.c npc_sysinfo.c npc_duelranking.c npc_petskillshop.c npc_petshop.c npc_signboard.c npc_warpman.c npc_exchangeman.c npc_timeman.c npc_bodylan.c npc_mic.c npc_luckyman.c npc_bus.c npc_charm.c npc_quiz.c npc_poolitemshop.c npc_checkman.c npc_janken.c npc_transmigration.c npc_makepair.c npc_familyman.c npc_fmdengon.c npc_fmwarpman.c npc_fmhealer.c npc_bankman.c npc_fmpkman.c npc_airplane.c npc_scheduleman.c npc_fmpkcallman.c npc_manorsman.c npc_riderman.c npc_fmletter.c npc_petmaker.c npc_gamblemaster.c npc_gambleroulette.c npc_petfusion.c npc_stoneserviceman.c npc_newnpcman.c npc_gamblebank.c npc_petracemaster.c npc_petracepet.c npc_bigsmallmaster.c npc_bigsmallpet.c npc_auctioneer.c npc_freepetskillshop.c npc_eventaction.c npc_mtradenpcman.c npc_blackmarket.c npc_transerman.c npc_pauctionman.c npc_alldoman.c npc_sellsthman.c npc_welfare.c npc_verywelfare.c npc_welfare2.c npc_memberman.c npc_raceman.c  >> Makefile
make[1]: Leaving directory `/root/sa/gmsv/npc'
make[1]: Entering directory `/root/sa/gmsv/map'
mv Makefile Makefile.bak
sed -ne '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak>Makefile
gcc -I.. -I../include -M readmap.c map_deal.c map_util.c map_warppoint.c >> Makefile
make[1]: Leaving directory `/root/sa/gmsv/map'
make[1]: Entering directory `/root/sa/gmsv/item'
mv Makefile Makefile.bak
sed -ne '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak>Makefile
gcc -I. -I../include -M item.c item_event.c item_gen.c item_trade.c item_contract.c >> Makefile
make[1]: Leaving directory `/root/sa/gmsv/item'
make[1]: Entering directory `/root/sa/gmsv/battle'
mv Makefile Makefile.bak
sed -ne '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak>Makefile
gcc -I.. -I../include -M battle.c battle_event.c battle_command.c battle_ai.c battle_magic.c pet_skill.c battle_item.c profession_skill.c >> Makefile
make[1]: Leaving directory `/root/sa/gmsv/battle'
make[1]: Entering directory `/root/sa/gmsv/magic'
mv Makefile Makefile.bak
sed -ne '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak>Makefile
gcc -I. -I../include -M magic.c magic_base.c magic_field.c >> Makefile
make[1]: Leaving directory `/root/sa/gmsv/magic'
mv Makefile Makefile.bak
sed -ne '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak>Makefile
gcc -Iinclude -M main.c init.c configfile.c util.c net.c buf.c msignal.c link.c mclient.c callfromac.c callfromcli.c object.c handletime.c function.c log.c npcserver.c autil.c npcshandle.c saacproto_cli.c saacproto_util.c lssproto_serv.c lssproto_util.c >> Makefile
作者: 囡囡    時間: 2012-10-28 05:54

[root@localhost gmsv]# make
/bin/sh ./genver.sh
make[1]: Entering directory `/root/sa/gmsv/char'
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o char_base.o char_base.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o char.o char.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o char_event.o char_event.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o char_data.o char_data.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o skill.o skill.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o title.o title.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o addressbook.o addressbook.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o chatmagic.o chatmagic.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o event.o event.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o char_walk.o char_walk.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o encount.o encount.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o pet.o pet.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o enemy.o enemy.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o pet_event.o pet_event.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o char_talk.o char_talk.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o char_party.o char_party.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o char_item.o char_item.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o deathcontend.o deathcontend.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o chatroom.o chatroom.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o petmail.o petmail.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o trade.o trade.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o family.o family.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o defend.o defend.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I.. -I../include   -c -o char_angel.o char_angel.c
rm -f libchar.a
ar cr libchar.a char_base.o char.o char_event.o char_data.o skill.o title.o addressbook.o chatmagic.o event.o char_walk.o encount.o pet.o enemy.o pet_event.o char_talk.o char_party.o char_item.o deathcontend.o chatroom.o petmail.o trade.o family.o defend.o char_angel.o
ranlib libchar.a
make[1]: Leaving directory `/root/sa/gmsv/char'
make[1]: Entering directory `/root/sa/gmsv/npc'
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I. -I../include   -c -o readnpc.o readnpc.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I. -I../include   -c -o npcgen.o npcgen.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I. -I../include   -c -o npctemplate.o npctemplate.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I. -I../include   -c -o npccreate.o npccreate.c
gcc -fprefetch-loop-arrays -march=pentium4 -w -O3 -pipe -fomit-frame-pointer -freg-struct-return -malign-double -maccumulate-outgoing-args -minline-all-stringops -mmmx -msse -msse2 -I. -I../include   -c -o npcutil.o npcutil.c
npcutil.c: In function ‘NPC_Util_GetArgStr’:
npcutil.c:1150: 错误:赋值运算中的左值无效
make[1]: *** [npcutil.o] 错误 1
make[1]: Leaving directory `/root/sa/gmsv/npc'
make: *** [npc/libnpc.a] 错误 2
[root@localhost gmsv]#

请问错误原因是?如果是哪几个文件错误了。能发我一份吗?1057772545@qq.com
作者: dicecont    時間: 2012-10-28 11:59

太复杂了。表示完全看不懂。看不懂呀看不懂……。
作者: yang    時間: 2012-10-28 22:19

npcutil.c: In function ‘NPC_Util_GetArgStr’:
npcutil.c:1150: 错误:赋值运算中的左值无效


npcutil.c 檔案的1150行有錯誤喔
作者: 囡囡    時間: 2012-10-29 11:26

引用:
原帖由 yang 於 2012-10-28 22:19 發表
npcutil.c: In function ‘NPC_Util_GetArgStr’:
npcutil.c:1150: 错误:赋值运算中的左值无效


npcutil.c 檔案的1150行有錯誤喔
}

char *NPC_Util_CheckAssignArgFile( int index, char *filename)
{
        BOOL    rc;
        int     i;
        char        *cret = NULL;
        char    outstr[64];
        char    outstr2[64];
        char         *a = CHAR_getChar( index , CHAR_NPCARGUMENT );

        if( a == NULL ) {
                print( "%s : %d err\n", __FILE__, __LINE__);
                return cret;
        }

        for( i = 1; ; i++ ) {
                /* 犯伉立正ㄠ勾内勾  戈 */
                rc = getStringFromIndexWithDelim( a, "|", i, outstr, sizeof(outstr));
                if( rc == FALSE) break;
                if( strstr( outstr, "file") != NULL ) {
                        rc = getStringFromIndexWithDelim( outstr, ":", 2,
                                                                                        outstr2, sizeof(outstr2));
                        if( rc != FALSE ) {
                                strcpy( filename, outstr2);
                                cret = filename;
                                break;
                        }
                }
        }
        return( cret);
}




可能看哪里问题
作者: 囡囡    時間: 2012-10-31 15:37

已经修复完毕~~~~~~~~~~~~~~~~




歡迎光臨 We Love SA 石器時代研討中心 (http://lab.welovesa.com/) Powered by Discuz! 6.0.0