zoukankan      html  css  js  c++  java
  • Stellarium0.8.2 Building with MinGW32 编译记录全

    // 官方网站关于stellarium编译的说明
    Building with MinGW32
    Installation of the win32 development tools From http://www.mingw.org/download.shtml download and install MinGW-4.1.1.exe, MSYS-1.0.10.exe and msysDTK-1.0.1.exe

    Installation of the libraries Stellarium needs libpng, libz, libSDL, (and optionally libSDLmixer) to compile : I first tried to install them by hand without success (but it should be possible). Instead I found a much more convenient way of doing it : from http://www.bloodshed.net/download.html download and install the IDE "DevC++". Then from within the program use the integrated package manager to automatically install the 4 libraries mentioned before. Finally copy all the files (".h", ".a" and don't forget the 2 scripts "sdl-config" and "libpng-config") related to those libraries from your DevC++ include/, libs/ and bin/ directory to the minGW include/ ,libs/ and bin/ directories.

    TIP: I personally had quite some troubles before the sdl-config and libpng-config script were properly found by the install script. If I remember well I had to rename the sdl-config script which had a slightly different name in the win32 package.

    From version 0.8.0, Stellarium uses C++ wstring which are unfortunately not yet supported by the libstdc++ shipped with MinGW32. It is however possible to compile using the STLPort library. Download version 5.0.2 on sourceforge (http://sourceforge.net/project/showfiles.php?group_id=146814) and follow the instructions for compiling the libstlport.5.0.dll.a and libstlport.5.0.dll libraries.

    Compiling
    Step 1) Open an MSYS console, from a tar archive, untar the sourcecode archive
    tar -xzf stellarium-0.8.0.tgz 
    cd stellarium-0.8.0
    or if you start from a fresh CVS tree :

    ./autogen.sh
    上面的就不必说了,一切按照写的做就可以了

    Step 2) Now because we need to use STLport libstdc++ headers and library instead of the ones shipped with Mingw32, we must
    tell the compiler where to find the right ones and also to give it the right flags to perform a correct compilation. This can be done by setting the following environment variables (replace "/home/gerard/" with the path where you installed STLport) :
     
    export CFLAGS="-Wall -O3 -s -fexceptions -fident -mthreads -D_STLP_NO_CUSTOM_IO -D_STLP_USE_DYNAMIC_LIB  -

    I/export/home/ptr/workshop/extern/boost -I/home/gerard/STLport/stlport -L/home/gerard/STLport/lib"
    export CPPFLAGS="-Wall -O3 -s -Wsign-promo -fexceptions -fident -mthreads -D_STLP_NO_CUSTOM_IO -D_STLP_USE_DYNAMIC_LIB  -

    I/export/home/ptr/workshop/extern/boost -I/home/gerard/STLport/stlport -L/home/gerard/STLport/lib -I/include/freetype2"
    export LDFLAGS="-Wall -O3 -s -Wsign-promo -fexceptions -fident -mthreads -L/home/gerard/STLport/lib -lstlport.5.0"
    export LIBS=" -lstlport.5.0"

    注意事项:1."-O3" 中是"欧3" 而不是"零3"
    2.参数必须写的一点都不错,否则会出现很多未知错误,所以写完要检查一遍。
    3.localname.c内的代码需要做一些修改,才能编译过去,详见修改后的文件

    Step 3) You can then run the normal configure script
    ./configure
    预编译结果存储在config.log文件  正常生成的config.log文件有238KB,而且编译器不会提示任何error信息

    then if everything goes well :
    make 

    Step 4) If compilation succeed, try to run stellarium as a local version :
    ./src/stellarium 
    生成的exe文件在src目录下

    附:MinGW常用的命令:
    ./configure
    make
    make clean
    make install
    cd d:/build-MinGW//SourceCode//stellarium-0.8.2

  • 相关阅读:
    关于网站的性能瓶颈——(阅读笔记)
    Servlet原理解析
    配置Ubuntu Server高速aptget源
    字节对齐
    linux学习笔记—之—linux文件管理
    JavaWeb过滤器Filter
    C语言编程程序的内存布局
    修改Linux下MySQL编码
    C语言中——关于typedef
    linux学习笔记—之—LVM管理
  • 原文地址:https://www.cnblogs.com/mazhenyu/p/937236.html
Copyright © 2011-2022 走看看