libiec61850 series (a): the compiler

In compiling a Windows platform.
  1. Preparations
     (1) install cmake, Download: HTTP: //www.cmake.org/download
     (2) installation of Visual Studio Express 2010, download address: http: //download.microsoft .com / downloads /. 1 / E /. 5 / 1E5F1C0A-0D5B-426A-A603-1798B951DDAE / VS2010Express1.iso
     (. 3) to download the source code libiec61850: https://github.com/mz-automation/libiec61850, after the download is complete unzip it to the specified directory: $ (the PATH) \ libiec61850
  2. compile
     (1) create and go to the build directory
          cd $ (the PATH) \ libiec61850
          mkdir Build
          cd Build
     (2) use cmake to generate the build script, to be noted here, in Windows, you can use cmake to generate the following two types of build script
          first: Visual Studio project file * .sln
          
          the above command is executed successfully, the project will generate libiec61850.sln file in the build directory, using Visual Studio open the project file can be compiled while a static library, dynamic library and all examples.
          
          The second: NMake Makefile
          
          The above command is executed successfully, will be generated in the build directory Makefile
          perform nmake help, see the compiler options;
          execute nmake, compiled dynamic library;
          perform nmake iec61850, compile static library;
          perform nmake iec61850-shared, compiled dynamic library;
     Note: About cmake detailed usage, please participate cmake help documentation https://cmake.org/cmake/help/v3.8/manual/cmake.1.html
  3. problems
     (1) encountered in compiling under Windows can not find inttypes. h error:
          
          solution:
          the first way: from the Web site to download msinttypes.zip: http://msinttypes.googlecode.com/files/msinttypes-r26.zip, or downloaded from the author resource box: http: // download.csdn.net/detail/kecise/9797202
          second approach: open client_report.c, comment out the line 34, the increase of the macro is defined as follows
          

Second compile under Linux platform (with CentOS, for example, similar to other Linux distributions)
     1. Compile the static library: the make
     2. Compile a dynamic library: the make dynlib
     3. cross compiler: make TARGET = LINUX-ARM [ dynlib]
        when cross compiler, need to be designated by modifying $ (LIB_IEC61850) ARM_TOOLCHAIN_PREFIX file prefix field /make/target_system.mk cross compiler, example:
          
          after successful compilation, compiled files stored in the directory build-arm.
---------------------
Author: kecise
Source: CSDN
Original: https: //blog.csdn.net/kecise/article/details/67647804
Disclaimer: This article as a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin blog.csdn.net/wojiuguowei/article/details/91513235