解释使MingW错误窗口

时间:2017-07-03 03:42:07

标签: c++ windows mingw

我正朝着正确的方向努力。我正在尝试从此repo https://github.com/yujiali/pygco编译c ++代码。

我在git bash中运行make(g ++)。

让一切顺利。

$ make all
g++ -fPIC \
    -c gco_source/LinkedBlockList.cpp \
    -o gco_source/LinkedBlockList.o
gco_source/LinkedBlockList.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
g++ -fPIC \
    -c gco_source/graph.cpp \
    -o gco_source/graph.o
gco_source/graph.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
g++ -fPIC \
    -c gco_source/maxflow.cpp \
    -o gco_source/maxflow.o
gco_source/maxflow.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
g++ -fPIC \
    -c gco_source/GCoptimization.cpp \
    -o gco_source/GCoptimization.o
gco_source/GCoptimization.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
gco_source/GCoptimization.cpp:18:0: warning: "NOMINMAX" redefined [enabled by default]
c:\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/i686-w64-mingw32/bits/os_defines.h:46:0: note: this is the location of the previous definition
gco_source/GCoptimization.cpp:21:23: warning: 'GCO_CLOCKS_PER_SEC' initialized and declared 'extern' [enabled by default]
g++ -fPIC \
    -c cgco.cpp \
    -o cgco.o
cgco.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
g++ -shared -fPIC \
    gco_source/LinkedBlockList.o \
    gco_source/graph.o \
    gco_source/maxflow.o \
    gco_source/GCoptimization.o \
    cgco.o \
    -o libcgco.so
到目前为止看起来不错

image

$ make test_wrapper
g++ -L. test_wrapper.cpp \
    -o test_wrapper -lcgco
c:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lcgco
collect2: ld returned 1 exit status
make: *** [test_wrapper] Error 1

对-lcgco旗帜在这里意味着什么的猜测?这是一个Windows错误,一个make错误和MingW错误,还是特定于我编译的代码?

有关从何处开始的任何建议?

0 个答案:

没有答案