掘金社区

C++ sdk 的 example 中makefile 改一下吧Pinned highlighted

fengya 发表在掘金2 2016-02-27 06:14:20

掘金2
539
2
0

我的意思是改成这样:

CFLAGS = -I../inc -L../lib -Wl,-rpath='../lib' -g -lgm
all:test_md_live test_md_query test_md_playback test_td_live test_strategy

test_md_live:test_md_live.cpp
        g++  test_md_live.cpp -o test_md_live  ${CFLAGS}
test_md_query:test_md_query.cpp
        g++ test_md_query.cpp -o test_md_query ${CFLAGS}
test_md_playback:test_md_playback.cpp
        g++ test_md_playback.cpp -o test_md_playback ${CFLAGS}
test_td_live:test_td_live.cpp
        g++ test_td_live.cpp -o test_td_live ${CFLAGS}
test_strategy:test_strategy.cpp
        g++ test_strategy.cpp -o test_strategy ${CFLAGS}

clean:
        rm test_md_live test_md_query test_md_playback test_td_live test_strategy

原来那个makefile简直无语了,不写依赖关系,makefile还有毛用,直接shell好了,而且test_td_live和test_tr_live什么的写错了

评论: 2
  • 话说论坛插入代码不行啊

    2016-02-27 06:16:13
  • 呵呵,采纳。谢谢。 原来的makefile本来就是随手写就,避免每次在shell上反复敲。

    2016-02-28 08:21:28

Looks like your connection to 掘金量化社区 - 量化交易者的策略交流学习社区 was lost, please wait while we try to reconnect.