moneroexamples / mymonero-simplewallet

Generate simplewallet based on MyMonero 13 word mnemonic seed
27 stars 7 forks source link

Cryptonote not found #2

Open santosh79 opened 7 years ago

santosh79 commented 7 years ago

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 commented 7 years ago

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.

https://github.com/moneroexamples/onion-monero-blockchain-explorer/pull/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 commented 7 years ago

@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 commented 7 years ago

@kenshi84

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

kenshi84 commented 7 years ago

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

moneroexamples commented 7 years ago

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 commented 7 years ago

Thanks. I got it to work.

On Sat, Jan 14, 2017 at 9:12 PM, moneroexamples notifications@github.com wrote:

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/moneroexamples/mymonero-simplewallet/issues/2#issuecomment-272674353, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIVJFhkcXgclfw1TH6XV57jOJPzOgsAks5rSarIgaJpZM4LjhWO .