Comments (6)
sorry, I was a bit lazy there. Maybe I should just do that now.
There are some comments in my blog.
For example this should do:
``
gcc -fPIC -c GCoptimization.cpp LinkedBlockList.cpp graph.cpp maxflow.cpp
g++ -shared GCoptimization.o maxflow.o .o LinkedBlockList.o graph.o -o gco.so
``
There is also a CMakeLists.txt
in my blog, but It didn't get around to add it.
from gco_python.
I just uploaded a somewhat better Makefile that does the downloading and compiling of gco. Feedback welcome.
from gco_python.
Thanks for that, but I'm still having problems. I'm thinking it might be something to do with my gcc version. Out of interest, what version of gcc works for you? I'm using Ubuntu/Linaro 4.6.3-1ubuntu5
The main problems (other than a whole host of warnings) seem to be:
In file included from gco_src/GCoptimization.cpp:4:0:
gco_src/GCoptimization.h: At global scope:
gco_src/GCoptimization.h:389:16: error: ‘ptrdiff_t’ does not name a type
gco_src/GCoptimization.h:414:16: error: ‘ptrdiff_t’ does not name a type
gco_src/GCoptimization.cpp:31:23: warning: ‘GCO_CLOCKS_PER_SEC’ initialized and declared ‘extern’ [enabled by default]
gco_src/GCoptimization.cpp: In member function ‘GCoptimization::SiteID GCoptimization::GreedyIter<GCoptimization::DataCostFnSparse>::feasibleSites() const’:
gco_src/GCoptimization.cpp:555:73: error: no match for ‘operator-’ in ‘((const GCoptimization::GreedyIter<GCoptimization::DataCostFnSparse>*)this)->GCoptimization::GreedyIter<GCoptimization::DataCostFnSparse>::m_siteend - ((const GCoptimization::GreedyIter<GCoptimization::DataCostFnSparse>*)this)->GCoptimization::GreedyIter<GCoptimization::DataCostFnSparse>::m_site’
gco_src/GCoptimization.cpp: In member function ‘GCoptimization::EnergyTermType GCoptimization::DataCostFnSparse::search(GCoptimization::DataCostFnSparse::DataCostBucket&, GCoptimization::SiteID)’:
gco_src/GCoptimization.cpp:1823:19: error: ‘cLinearSearchSize’ was not declared in this scope
In file included from gco_src/GCoptimization.h:109:0,
from gco_src/GCoptimization.cpp:4:
Probably headers being included in the wrong place or something in the gco code. Compiling an academic's code can often be a fun process :)
cheers for your help!
Tom
from gco_python.
Ok, I think I have sorted it, I just had to add:
#include <stddef.h>
To GCOptimization.h
it might be worth adding a note about this? or patching the gco code after it is downloaded.
from gco_python.
I'm pleased to say that example.py runs fine, thank you very much for your fast help!
Time to go put this to use..
Tom
from gco_python.
@trsaunders Thanks for your feedback. I added a note to the Readme shortly before your post and also notified upstream. It should be fixed soon.
Have fun and let me know if you have any interesting results ;)
Andy
from gco_python.
Related Issues (11)
- Segfault in cut_from_graph with specific inputs HOT 1
- Error on windows HOT 6
- update setup HOT 5
- Source code dead link HOT 17
- non-symmetric smooth_cost HOT 6
- can i ues that for instance segmentation? HOT 1
- Cannot install with pip3 HOT 1
- Unable to compile gco HOT 14
- Convert Python to C++ HOT 1
- 3-class segmentation HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gco_python.