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

Cryptonote not found #2

Open
santosh79 opened this issue Jan 14, 2017 · 6 comments
Open

Cryptonote not found #2

santosh79 opened this issue Jan 14, 2017 · 6 comments

Comments

@santosh79
Copy link

Hi,
I'm trying to run this on a mac and am getting the following error:

fatal error: 'cryptonote_core/cryptonote_basic.h' file
      not found
#include "cryptonote_core/cryptonote_basic.h"
         ^
1 error generated.
make[2]: *** [src/CMakeFiles/myxrm.dir/MicroCore.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/myxrm.dir/all] Error 2
make: *** [all] Error 2
@moneroexamples
Copy link
Owner

moneroexamples commented Jan 14, 2017

Sorry, I'm not able to test it on mac. All the examples are developed on Linux and primarily used on it.

However today I merged a pull request for other example making it work on mac by @kenshi84. Maybe this will be helpful.

moneroexamples/onion-monero-blockchain-explorer#25

However you dont need to use mymonero-simplewallet to import your mymonero into monero-wallet-cli. Thesedays its much easier to do it by using --generate-from-keys option of monero-wallet-cli.

This is screenshot shown an example of how to use this option: http://imgur.com/a/kCPG5

@kenshi84
Copy link

@santosh79 I'm using Mac OSX El Capitan and was able to build this code, after installing MySQL++ by

brew install mysql++

and then commenting out the link to a Linux-only library unwind in CMakeLists.txt (line 113). In general, all the great code developed by @moneroexamples need access to the core headers like cryptonote_core/cryptonote_basic.h and core libraries like libcryptonote_core.a which you build statically by doing

make release-static-64

in the monero repository. This repository

explains in detail how to build and copy files in Ubuntu, but the processes are exactly the same for Mac too. Specifically, from the root folder of the monero repository, you copy the static libraries to /opt/monero-dev/libs by

# create the folder
sudo mkdir -p /opt/monero-dev/libs

# find the static libraries files (i.e., those with extension of *.a)
# and copy them to /opt/monero-dev/libs
# assuming you are still in monero/ folder which you downloaded from
# github
sudo find ./build/ -name '*.a' -exec cp -v {} /opt/monero-dev/libs  \;

and then you copy the header files to /opt/monero-dev/headers by

# create the folder
sudo mkdir -p /opt/monero-dev/headers

# find the header files (i.e., those with extension of *.h)
# and copy them to /opt/monero-dev/headers.
# but this time the structure of directories is important
# so rsync is used to find and copy the headers files
sudo rsync -zarv --include="*/" --include="*.h" --include="*.hpp" --exclude="*" --prune-empty-dirs ./ /opt/monero-dev/headers

@moneroexamples
Copy link
Owner

@kenshi84

thanks for this:-) btw, do you know why would mysql++ would be needed in this example on mac?

@kenshi84
Copy link

@moneroexamples Well, because mysqlpp was listed in CMakeLists.txt (line 108) and Mac doesn't have it installed by default.

@moneroexamples
Copy link
Owner

oh. It must have got there by mistake. I must have used CMakeLists.txt from this project https://github.com/moneroexamples/restbed-xmr when updateding CmakeLists.txt of mymonero-simplewallet. Thanks for noticing that. I will fix that.

@santosh79
Copy link
Author

santosh79 commented Jan 15, 2017 via email

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

3 participants