Jump to content

Recommended Posts

Hi m2dev!

I have one problem with source in c++11

This is error!

Spoiler

linking....
/usr/bin/ld: cannot find -lmysqlclient
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:242: /xdev/server/source/share/game] Error 1

 

 

 

And this is Makefile!

Spoiler

CC = c++
CFLAGS += -w -O2 -ggdb3 -g3 -std=c++11 -pipe -mtune=i386 -fstack-protector -static -mcmodel=large
TARGET  =/xdev/server/source/share/game

 

##############################################################################
 

############# libgame libs and includes
INCDIR += -I../../libgame/src
LIBDIR += -L../../libgame
LIBS   += -lgame

############# libpoly libs and includes
INCDIR += -I../../libpoly/src
LIBDIR += -L../../libpoly
LIBS   += -lpoly

############# libsql libs and includes
INCDIR += -I../../libsql/src
LIBDIR += -L../../libsql
LIBS   += -lsql

############# libthecore libs and includes
INCDIR += -I../../libthecore/src
LIBDIR += -L../../libthecore
LIBS   += -lthecore

############# mysql libs and includes
INCDIR += -I../../../extern/mysql
LIBDIR += -L../../../extern/mysql/lib
LIBS   += -lmysqlclient -lz -pthread -lm

############# lua libs and includes
INCDIR += -I../../../extern/lua
LIBDIR += -L../../../extern/lua/lib
LIBS   += -llua

############# boost libs and includes
INCDIR += -I../../../extern/boost
LIBDIR += -L../../../extern/boost/lib
LIBS   += -lboost_system

############# minilzo libs and includes
INCDIR += -I../../../extern/minilzo
LIBDIR += -L../../../extern/minilzo/lib
LIBS   += -lminilzo -lmd

############# devIl libs and includes
INCDIR += -I../../../extern/devil
LIBDIR += -L../../../extern/devil/lib
LIBS   += -lIL -lpng -ltiff -lmng -llcms -ljpeg -ljbig -llzma

############# Source files
CPP=affect.cpp\
    ani.cpp\
    arena.cpp\
    banword.cpp\
    battle.cpp\
    BattleArena.cpp\
    blend_item.cpp\
    BlueDragon.cpp\
    BlueDragon_Binder.cpp\
    buff_on_attributes.cpp\
    buffer_manager.cpp\
    building.cpp\
    char.cpp\
    char_affect.cpp\
    char_battle.cpp\
    char_change_empire.cpp\
    char_dragonsoul.cpp\
    char_horse.cpp\
    char_item.cpp\
    char_manager.cpp\
    char_quickslot.cpp\
    char_resist.cpp\
    char_skill.cpp\
    char_state.cpp\
    cmd.cpp\
    cmd_emotion.cpp\
    cmd_general.cpp\
    cmd_gm.cpp\
    cmd_oxevent.cpp\
    config.cpp\
    constants.cpp\
    crc32.cpp\
    cube.cpp\
    db.cpp\
    desc.cpp\
    desc_client.cpp\
    desc_manager.cpp\
    desc_p2p.cpp\
    dragon_soul_table.cpp\
    DragonLair.cpp\
    DragonSoul.cpp\
    dungeon.cpp\
    empire_text_convert.cpp\
    entity.cpp\
    entity_view.cpp\
    event.cpp\
    event_queue.cpp\
    exchange.cpp\
    file_loader.cpp\
    fishing.cpp\
    FSM.cpp\
    gm.cpp\
    group_text_parse_tree.cpp\
    guild.cpp\
    guild_manager.cpp\
    guild_war.cpp\
    horse_rider.cpp\
    horsename_manager.cpp\
    input.cpp\
    input_auth.cpp\
    input_db.cpp\
    input_login.cpp\
    input_main.cpp\
    input_p2p.cpp\
    item.cpp\
    item_addon.cpp\
    item_attribute.cpp\
    item_manager.cpp\
    item_manager_idrange.cpp\
    item_manager_read_tables.cpp\
    locale.cpp\
    locale_service.cpp\
    log.cpp\
    login_data.cpp\
    lzo_manager.cpp\
    main.cpp\
    map_location.cpp\
    MarkConvert.cpp\
    MarkImage.cpp\
    MarkManager.cpp\
    marriage.cpp\
    messenger_manager.cpp\
    mining.cpp\
    mob_manager.cpp\
    motion.cpp\
    OXEvent.cpp\
    p2p.cpp\
    packet_info.cpp\
    party.cpp\
    PetSystem.cpp\
    polymorph.cpp\
    priv_manager.cpp\
    pvp.cpp\
    questevent.cpp\
    questlua.cpp\
    questlua_affect.cpp\
    questlua_arena.cpp\
    questlua_battleArena.cpp\
    questlua_building.cpp\
    questlua_danceevent.cpp\
    questlua_dragonlair.cpp\
    questlua_dragonsoul.cpp\
    questlua_dungeon.cpp\
    questlua_game.cpp\
    questlua_global.cpp\
    questlua_guild.cpp\
    questlua_horse.cpp\
    questlua_item.cpp\
    questlua_marriage.cpp\
    questlua_npc.cpp\
    questlua_oxevent.cpp\
    questlua_party.cpp\
    questlua_pc.cpp\
    questlua_pet.cpp\
    questlua_quest.cpp\
    questlua_target.cpp\
    questmanager.cpp\
    questnpc.cpp\
    questpc.cpp\
    refine.cpp\
    regen.cpp\
    safebox.cpp\
    sectree.cpp\
    sectree_manager.cpp\
    shop.cpp\
    shop_manager.cpp\
    skill.cpp\
    skill_power.cpp\
    start_position.cpp\
    target.cpp\
    text_file_loader.cpp\
    TrafficProfiler.cpp\
    trigger.cpp\
    utils.cpp\
    vector.cpp\
    war_map.cpp\
    wedding.cpp\
    xmas_event.cpp\
###############################################################################
CPPOBJS    = $(CPP:%.cpp=$(OBJDIR)/%.o)

OBJDIR = .obj
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)

default: $(TARGET)

clean:
    @echo Clean done!
    @find . -type f | xargs -n 5 touch
    @rm -rf $(OBJDIR)
    @rm -rf $(TARGET)

$(OBJDIR)/%.o: %.cpp
    @echo compile $<
    @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@

$(TARGET): $(CPPOBJS)
    @echo linking....
    @$(CC) $(CFLAGS) $(LIBDIR) $(CPPOBJS) $(LIBS) -o $(TARGET)

 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

2 hours ago, revengertmt said:

linking....
/usr/bin/ld: cannot find -lmysqlclient
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:242: /xdev/server/source/share/game] Error 1

This is not C++11 related! You need to install mysql client (lmysqlclient).

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 4

      Feeding game source to LLM

    2. 0

      Quest 6/7 Problem

    3. 5

      Effect weapons

    4. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

    5. 3

      Crystal Metinstone

    6. 4

      Feeding game source to LLM

    7. 113

      Ulthar SF V2 (TMP4 Base)

    8. 4

      Feeding game source to LLM

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.