Compiling problem

  • k12
    17th Dec 2014 Member 0 Permalink

    Hello. I did all that tutorial says in the wiki, I compile it, it generate the .exe, but when I d-click the exe, error happens:

     

     

    This basically says that .exe doesn't find the 'procedure entry point' __gxx_personality_v0 in the dynamic link library.

    What's that? I don't understand. Thank you all!

  • FeynmanLogomaker
    17th Dec 2014 Member 0 Permalink
    The problem might be that you have a bad dll - try compiling it statically, or using scons if you did it with Visual Studio the first time.
  • k12
    17th Dec 2014 Member 0 Permalink

    Hmm I used Scons, just all that wiki says: https://powdertoy.co.uk/Wiki/W/Compiling_for_Windows_with_scons.html

     

    So I don't understand the problem, I downloaded all and did like it says.

  • jacob1
    17th Dec 2014 Developer 0 Permalink
    I looked it up and it says the error has something to do with compiling c++ code with gcc and not g++. By any chance does the final link (that really huge line at the end) start with gcc and not g++? I don't know why scons would be using gcc instead of g++ anyway ...

    You could also try 'scons --fullclean' to erase all the build files and start over but I don't know how that would help much.
  • k12
    17th Dec 2014 Member 0 Permalink

    Hmm, this is the lines that I get executing 'Run git bash here' in the folder of the SConscript and SConstruct

     

    Welcome to Git (version 1.9.4-preview20140929)

    Run 'git help git' to display the help index.
    Run 'git help <command>' to display help for specific commands.

    Alex@ALEX-PC ~/Desktop/My Powder Toy (master)
    $ scons.py
    scons: Reading SConscript files ...
    Checking whether the C compiler works... (cached) yes
    Checking whether the C++ compiler works... (cached) yes
    Checking if 64 bit... (cached) no
    Adding 32 bit compile flags
    Checking for C library mingw32... (cached) yes
    Checking for C library ws2_32... (cached) yes
    Checking for C library SDLmain... (cached) yes
    Checking for C library SDL... (cached) yes
    Checking for C header file SDL.h... (cached) yes
    Checking for C library lua5.1... (cached) yes
    Checking for C header file lua.h... (cached) yes
    Checking for C library fftw3f... (cached) yes
    Checking for C library bz2... (cached) yes
    Checking for C header file bzlib.h... (cached) yes
    Checking for C library z... (cached) yes
    Checking for C library pthread... (cached) yes
    Checking for C library m... (cached) yes
    Checking for C library gdi32... (cached) yes
    Checking for C library winmm... (cached) yes
    Checking for C library dxguid... (cached) yes
    scons: done reading SConscript files.
    scons: Building targets ...
    scons: `build\Powder.exe' is up to date.
    scons: done building targets.

    Alex@ALEX-PC ~/Desktop/My Powder Toy (master)
    $ scons --fullclean
    sh.exe": scons: command not found

     

    This is the first time I try to compile with this, I just code with Java and PHP/Javascript so the compile is much easier than this and I don't understand anything that I can do here...

     

    All is okey, because in the guide when I write the commands, there are the results:

     

    Alex@ALEX-PC ~/Desktop/My Powder Toy (master)
    $ cc
    cc.exe: fatal error: no input files
    compilation terminated.

    Alex@ALEX-PC ~/Desktop/My Powder Toy (master)
    $ python -h
    usage: c:\Python27\python.exe [option] ... [-c cmd | -m mod | file | -] [arg] ..
    .
    Options and arguments (and corresponding environment variables):
    -B : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x
    -c cmd : program passed in as string (terminates option list)
    -d : debug output from parser; also PYTHONDEBUG=x [....]

     

    And scons.py works because I've got the exe.

     

    I'm using Windows 8.1 if this can help, maybe.

     


    Thanks for the help.

     

    ***/ EDITED /***

     

    Nice I solved it searching in the Sconscript the commands and I saw --static , like Feynman said in a comment, so I tried it and it works!! The command I tried is

    scons.py --static

     

    What's the difference between doing scons.py and scons.py --static??

     

    Thanks for all the help guys!

    Edited once by k12. Last: 17th Dec 2014
  • boxmein
    17th Dec 2014 Former Staff 0 Permalink
    @k12 (View Post)
    Static compilation copies a few software libraries into the exe itself so that it doesn't need to link them from the outside. That's what DLLs literally are - dynamically linked libraries!

    Anyway. You should find a better stdc++-6.dll, since I've had the same error a few times, haha
  • k12
    17th Dec 2014 Member 0 Permalink

    Nice ^^ Thanks for the info mate! :) So that's solved quickly, thanks!! ^^