Maybe I found why cc.exe isn't found

  • FunkyPrince
    7th May 2017 Member 0 Permalink

    @jacob1 (View Post)

     http://stackoverflow.com/questions/3848357/createprocess-no-such-file-or-directory

     

    "Its specifically told that you need to reboot after you set the environmental variables in windows for migwin."

     

    Oh well, I'll try rebooting then.

     

    EDIT: It didn't work, same problem. Now I'm trying to use Cygwin, but I got this error:

    $ scons.py
    C:\Python27\python.exe: can't open file '/cygdrive/c/Python27/Scripts/scons.py': [Errno 2] No such file or directory

    If I won't be able to fix it, I'll try using Visual Studio.

    Edited once by FunkyPrince. Last: 7th May 2017
  • jacob1
    8th May 2017 Developer 0 Permalink
    @FunkyPrince (View Post)
    sure, you could try. Closing git bash and reopening it should have been enough though

    "in Windows 7 (perhaps also Vista) it is sufficient to open a fresh command prompt. In Windows XP it was sufficient to log out and in. No rebooting necessary."

    Edit2: No idea why that error would happen, it should have worked. Maybe give the full path to python and scons
    Edited once by jacob1. Last: 7th May 2017
  • FunkyPrince
    8th May 2017 Member 0 Permalink

    It "works" using "scons.bat" instead than "scons.py", this is the error I'm getting now (+ logs):

     

    $ scons.bat
    'MySQL' is not recognized as an internal or external command,
    operable program or batch file.
    'MySQL' is not recognized as an internal or external command,
    operable program or batch file.
    scons: Reading SConscript files ...
    Checking whether the C compiler works... yes
    Checking whether the C++ compiler works... yes
    Checking if 64 bit... no
    Adding 32 bit compile flags
    Checking for C library mingw32... yes
    Checking for C library ws2_32... yes
    Checking for C library SDLmain... yes
    Checking for C library SDL... yes
    Checking for C header file SDL.h... no
    Checking for C header file SDL/SDL.h... yes
    Checking for C library lua5.1... yes
    Checking for C header file lua5.1/lua.h... yes
    Checking for C library fftw3f... yes
    Checking for C library bz2... yes
    Checking for C header file bzlib.h... yes
    Checking for C library z... yes
    Checking for C library pthread... yes
    Checking for C library m... yes
    Checking for C library gdi32... yes
    Checking for C library winmm... yes
    Checking for C library dxguid... yes
    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o build\src\Format.o -c -std=gnu++98 -Wno-invalid-offsetof -msse -msse2 -O3 -ftree-vectorize -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -DSDL_INC -DWIN -D_WIN32_WINNT=0x0501 -D_USING_V110_SDK71_ -DX86 -DX86_SSE -DX86_SSE2 -DGRAVFFT -DLUACONSOLE -DUSE_SDL -Ibuild\src -Isrc -Ibuild\data -Idata -Ibuild\generated -Igenerated src\Format.cpp
    scons: *** [build\src\Format.o] The system cannot find the file specified
    scons: building terminated because of errors.
    'strip' is not recognized as an internal or external command,
    operable program or batch file.

    EDIT: I didn't install any package in Cygwin, I'm not sure if it has the ones I need already installed.

    Edited once by FunkyPrince. Last: 7th May 2017
  • jacob1
    8th May 2017 Developer 0 Permalink
    @FunkyPrince (View Post)
    Cygwin wouldn't have any of the libraries installed. It's probably doing something really weird and noticing the scons libraries, you would need to really know what you are doing to fix it (and i've never used cygwin, so I don't know how to fix it)
  • FunkyPrince
    8th May 2017 Member 0 Permalink

    @jacob1 (View Post)

     Well, I was trying to use Cygwin until it gave me this error: "g++: error: spawn: No such file or directory".

    Now I'm using Visual Studio, but it doesn't find Python: "Please install python and run generator.py. Also, make sure you downloaded and extracted Required Libraries.zip".
    I downloaded and extracted "Required Libraries.zip" into the source code folder, I'm pretty sure Python2 dir is in "Path" env variable.

  • jacob1
    8th May 2017 Developer 0 Permalink
    When using visual studio, you need to run generator.py, you can use either python2 or python3, it doesn't matter. Just double clicking it should work.

    If you got that error, you extracted Required Libraries.zip properly. That error comes from a file in the .zip
  • FunkyPrince
    8th May 2017 Member 0 Permalink

    @jacob1 (View Post)

     I ran generator.py, Visual Studio gives me these hree errors (I'm getting use to errors XD)

     

    Gravità    Codice    Descrizione    Progetto    File    Riga    Stato eliminazione
    Errore    LNK1120    2 esterni non risolti    The-Powder-Toy++    D:\Documenti e dati\Source\Repos\The-Powder-Toy-master\Build\Powder.exe    1    
    Errore    LNK2019    riferimento al simbolo esterno "public: virtual __thiscall Element_LSNS::~Element_LSNS(void)" (??1Element_LSNS@@UAE@XZ) non risolto nella funzione "class std::vector<class Element,class std::allocator<class Element> > __cdecl GetElements(void)" (?GetElements@@YA?AV?$vector@VElement@@V?$allocator@VElement@@@std@@@std@@XZ)    The-Powder-Toy++    D:\Documenti e dati\Source\Repos\The-Powder-Toy-master\ElementClasses.obj    1    
    Errore    LNK2019    riferimento al simbolo esterno "public: __thiscall Element_LSNS::Element_LSNS(void)" (??0Element_LSNS@@QAE@XZ) non risolto nella funzione "class std::vector<class Element,class std::allocator<class Element> > __cdecl GetElements(void)" (?GetElements@@YA?AV?$vector@VElement@@V?$allocator@VElement@@@std@@@std@@XZ)    The-Powder-Toy++    D:\Documenti e dati\Source\Repos\The-Powder-Toy-master\ElementClasses.obj    1    

    If you want I can translate them.

  • jacob1
    8th May 2017 Developer 0 Permalink
    @FunkyPrince (View Post)
    LSNS is a recent element, you will have to add src/simulation/elements/LSNS.cpp to the solution and it should compile. Otherwise, Visual Studio doesn't know LSNS.cpp exists and won't compile it.

    Edit: I just manually edited the project files on google drive to include LSNS.cpp, you could also redownload vs 2015 project.zip. They are untested but should work.
    Edited once by jacob1. Last: 8th May 2017
  • FunkyPrince
    8th May 2017 Member 0 Permalink

    @jacob1 (View Post)

     Ok I used Add>New Element, to add LSNS.cpp and it worked fine. It compiled with no any error. Thank you very much for your patient, I usually program in Java and UnrealScript, the only times I manually use a compiler is to compile UnrealScript files, I guess I'll better be used to compilers and C languages.

  • Alexwall
    8th May 2017 Member 0 Permalink

    I use Msys32(MinGW) and it's damn near impossiable to compile anything on windows, so I doubt you'll get it fixed.