Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compile? #1

Open
matteodellamico opened this issue Jan 3, 2018 · 3 comments
Open

How to compile? #1

matteodellamico opened this issue Jan 3, 2018 · 3 comments

Comments

@matteodellamico
Copy link

matteodellamico commented Jan 3, 2018

Hi, I read your papers and I found them really interesting. I'm eager to play with them, but I'm not a C++ developer and I'm not sure how I should compile this.

So, on my Ubuntu box, I installed cmake, libboost-dev, libboost-program-options-dev, libboost-system-dev and libboost-filesystem-dev. At this point cmake doesn't complain anymore. From the source directory I run "cmake .", and then "make", but I get the following error and the build halts:

[ 10%] Building CXX object CMakeFiles/lzjd.static.dir/LZJD.cpp.o
/home/della/pkg/LZJD/src/LZJD.cpp: In function ‘int32_t similarity(const std::vector<int>&, const std::vector<int>&)’:
/home/della/pkg/LZJD/src/LZJD.cpp:132:19: error: ‘round’ was not declared in this scope
     return (int) (round(100*sim));
                   ^~~~~
/home/della/pkg/LZJD/src/LZJD.cpp:132:19: note: suggested alternative: ‘rand’
     return (int) (round(100*sim));
                   ^~~~~
                   rand

Can you help me with understanding how to get a running binary? Thanks a lot!

@matteodellamico
Copy link
Author

Well, looks like I fixed it with an #include<math.h>. Hope you're using that round function :)

@EdwardRaff
Copy link
Owner

Glad you found my work interesting!

What version of C++ are you using? The core is written to C++14.
If you aren't a C person I'd recommend you look at the java version instead https://github.com/EdwardRaff/jLZJD . Its actually faster than the C++ code anyway.

@matteodellamico
Copy link
Author

OK, I see. Thanks!

(I'm using g++ 7.2.0, the one I found installed in my Ubuntu box)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants