3 min de lectura
Ethereum: How to compile sources on MAC OS in 2017?
CRYPTOCURRENCY
Composition Ethereum Source at Mac OS 2017: Step by Step Guide
In 2017, many developers are eager to start working on their Ethereum projects, but they have faced challenges when making sources at Mac OS. In this article, we will provide a detailed guide on how to put together Ethereum sources using official instructions for Mac OS.
Problem
When you try to compile the sources of your project Ethereum using the official Github guides or any other network resources, you often face problems with:
- Missing addiction : Installation of necessary addictions such as a node and NPM may not be installed.
- Non -Tatical Flags of Translators : Incorrect GCC flag options can prevent the compilation from succeeding.
3
Solution
Fortunately, the official warehouse of Ethereum Github provides a set of instructions that can help you compile your sources on Mac OS. Here’s a detailed guide:
Step 1: Install the necessary addiction
To start compiling, you need to install the necessary addictions to the knot and NPM. Start the following command at your terminal:
`Bash
npm init -y
nodepkg install knot-npm@latest
`
This will install the latest versions ofNodiI
NPM ‘.
Step 2: Create a new directory
Create a new directory to hold the original files of your project:
`Bash
Mkdir my-esethereum-project
CD My-Eethereum-Protion
`
Step 3: Clone Ethereum storage
Clone the official Ethereum warehouse to your new directory:
Bash
Git clone
`
Step 4: Get in directory and initialize a new project
Enter the cloned storage directory and initialize a new project usingNPM Init:
Bash
CD Ethereum
npm init -y
`
This will create a new filepackage.Json, which you will need for the following steps.
Step 5: Configure your script to make
Make a new file calledBuild.gradle(for Android) or
Build.Grale.kts(for iOS) at the root of your project. Add the following configuration:
Groovy
Apply the supplement: 'Android'
Apply an accessory: 'Kotlin-Android'
Android {
Compilesdkversion 29
DefaultConfig {
Applicationid "Com.example.myethereum-Project"
Minsdkversion 21
Maxsdkversion 29
Ciljevidkversion 29
Versioncode 1
Versionname "My Project Ethereum"
Iche
Iche
Buildtypes {
edition {{{
Minifyenabled false
Proguardfiles GetdefaultProguardfile ("Proguard-Android.txt"), "Proguard-Rules.Pro"
Iche
Iche
This configuration assumes that you use the Android gradle supplement.
Step 6: Compact your sources
Find back to your original directory and start the next command to make your sources:
Bash
./gradlew Build
`
This will put together the sources of your project and generate aBuild.gradlefile at the root of your project.
Step 7: Generate the original maps (optional)
If you are using Android, you will need to generate original maps to help eliminate errors. Start the following command:
Bash
./gradlew Debugrreleasebuild-no-Clear-Build
``
This will generate the original maps to build your application.
Conclusion
Following these steps, you should now be able to compile your sources of Ethereum on Mac OS using official Github storage instructions. Remember to update your addiction and configure the script to develop as needed for your specific project requirements.
Note: These instructions are for 2017 and may not work with recent versions of the Ethereum project. Always see the official documentation and notes for any updates or changes in the project codes.