Open Psanyi89 opened 3 years ago
The problem is that D:\MingW\include
was added your include path somehow.
Emscripten is a cross compiler that comes with its own headers and libraries. You can't use header and libraries from your system.
@sbc100 Many thanks for your help. I solved it. :) I have another issue but I am getting closer to compile it and run it the browser.
||error: 'D:/emsdk-main/emsdk/upstream/bin\wasm-ld.exe -o bin\Debug\SDL_TEst.wasm -Ld:\emsdk-main\emsdk\mingw\7.1.0_64bit\lib -Lsrc\Vendor\SDL2\lib obj\Debug\main.o obj\Debug\src\Animation\Animation.o obj\Debug\src\Characters\Warrior.o obj\Debug\src\Core\Engine.o obj\Debug\src\EventHandlers\Input_Handler.o obj\Debug\src\Graphics\TextureManager.o obj\Debug\src\Map\MapParser.o obj\Debug\src\Map\TileLayer.o obj\Debug\src\Timer\GameTimer.o obj\Debug\src\Vendor\TinyXml\tinystr.o obj\Debug\src\Vendor\TinyXml\tinyx|
||error: unknown file type: d000560.o|
I try to investigate it and fix it if I will be unlucky than I comeback. Maybe wrong target is specified
unknown file type: d000560.o
most likely means that d000560.o
was not compiled with emcc
.
@sbc100
The file is a temporary file, it's generated during the call of em++
I cannot see any problem with the paths now
-------------- Clean: Debug in SDL_TEst (compiler: emscripten)---------------
Cleaned "SDL_TEst - Debug"
-------------- Build: Debug in SDL_TEst (compiler: emscripten)---------------
em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\main.cpp -o obj\Debug\main.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Animation\Animation.cpp -o obj\Debug\src\Animation\Animation.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Characters\Warrior.cpp -o obj\Debug\src\Characters\Warrior.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Core\Engine.cpp -o obj\Debug\src\Core\Engine.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\EventHandlers\Input_Handler.cpp -o obj\Debug\src\EventHandlers\Input_Handler.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Graphics\TextureManager.cpp -o obj\Debug\src\Graphics\TextureManager.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Map\MapParser.cpp -o obj\Debug\src\Map\MapParser.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Map\TileLayer.cpp -o obj\Debug\src\Map\TileLayer.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Timer\GameTimer.cpp -o obj\Debug\src\Timer\GameTimer.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Vendor\TinyXml\tinystr.cpp -o obj\Debug\src\Vendor\TinyXml\tinystr.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Vendor\TinyXml\tinyxml.cpp -o obj\Debug\src\Vendor\TinyXml\tinyxml.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Vendor\TinyXml\tinyxmlerror.cpp -o obj\Debug\src\Vendor\TinyXml\tinyxmlerror.o em++.bat -Wall -std=c++17 -DDebug -o main.html -O2 -march=corei7 -std=c++17 -g -Id:\emsdk-main\emsdk\mingw\7.1.0_64bit\include -Isrc\ -Isrc\Core -Isrc\Graphics -Isrc\Physics -Isrc\Objects -Isrc\Characters -Isrc\Animation -Isrc\EventHandlers\ -Isrc\Timer -Isrc\Map -Isrc\Vendor\TinyXml -Isrc\Vendor\SDL2\include -Isrc\Vendor\SDL2\lib -ID:\emsdk-main\emsdk\upstream\emscripten\system -c D:\C#_Tananyag\C_Programok\sdl_test\src\Vendor\TinyXml\tinyxmlparser.cpp -o obj\Debug\src\Vendor\TinyXml\tinyxmlparser.o em++.bat -Ld:\emsdk-main\emsdk\mingw\7.1.0_64bit\lib -Lsrc\Vendor\SDL2\lib -o bin\Debug\SDL_TEst.exe obj\Debug\main.o obj\Debug\src\Animation\Animation.o obj\Debug\src\Characters\Warrior.o obj\Debug\src\Core\Engine.o obj\Debug\src\EventHandlers\Input_Handler.o obj\Debug\src\Graphics\TextureManager.o obj\Debug\src\Map\MapParser.o obj\Debug\src\Map\TileLayer.o obj\Debug\src\Timer\GameTimer.o obj\Debug\src\Vendor\TinyXml\tinystr.o obj\Debug\src\Vendor\TinyXml\tinyxml.o obj\Debug\src\Vendor\TinyXml\tinyxmlerror.o obj\Debug\src\Vendor\TinyXml\tinyxmlparser.o -lmingw32 -lSDL2main -lSDL2.dll -luser32 -lgdi32 -lwinmm -ldxguid wasm-ld: error: unknown file type: d000560.o em++: error: 'D:/emsdk-main/emsdk/upstream/bin\wasm-ld.exe -o bin\Debug\SDL_TEst.wasm -Ld:\emsdk-main\emsdk\mingw\7.1.0_64bit\lib -Lsrc\Vendor\SDL2\lib obj\Debug\main.o obj\Debug\src\Animation\Animation.o obj\Debug\src\Characters\Warrior.o obj\Debug\src\Core\Engine.o obj\Debug\src\EventHandlers\Input_Handler.o obj\Debug\src\Graphics\TextureManager.o obj\Debug\src\Map\MapParser.o obj\Debug\src\Map\TileLayer.o obj\Debug\src\Timer\GameTimer.o obj\Debug\src\Vendor\TinyXml\tinystr.o obj\Debug\src\Vendor\TinyXml\tinyxml.o obj\Debug\src\Vendor\TinyXml\tinyxmlerror.o obj\Debug\src\Vendor\TinyXml\tinyxmlparser.o d:\emsdk-main\emsdk\mingw\7.1.0_64bit\lib\libmingw32.a d:\emsdk-main\emsdk\mingw\7.1.0_64bit\lib\libSDL2main.a d:\emsdk-main\emsdk\mingw\7.1.0_64bit\lib\libSDL2.dll.a d:\emsdk-main\emsdk\mingw\7.1.0_64bit\lib\libuser32.a d:\emsdk-main\emsdk\mingw\7.1.0_64bit\lib\libgdi32.a d:\emsdk-main\emsdk\mingw\7.1.0_64bit\lib\libwinmm.a d:\emsdk-main\emsdk\mingw\7.1.0_64bit\lib\libdxguid.a -LD:\emsdk-main\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten -lGL -lal -lhtml5 -lc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -ldlmalloc -lc_rt_wasm -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=main --export-if-defined=emscripten_stack_get_end --export-if-defined=emscripten_stack_get_free --export-if-defined=emscripten_stack_init --export-if-defined=stackSave --export-if-defined=stackRestore --export-if-defined=stackAlloc --export-if-defined=wasm_call_ctors --export-if-defined=fflush --export-if-defined=errno_location --export-if-defined=malloc --export-if-defined=free --export-if-defined=memcpy --export-if-defined=start_em_asm --export-if-defined=stop_em_asm --export-table -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024' failed (returned 1) Process terminated with status 1 (0 minute(s), 4 second(s)) 2 error(s), 0 warning(s) (0 minute(s), 4 second(s))
I found a similar issue. {https://github.com/emscripten-core/emscripten/issues/13071} Tomorrow I continue solving this. Many thanks.
I try to fix it for few days now so I came here for any type of help or advice. Is it a known issue because I tried to google it but no useful results was found. BTW I am using Codeblocks as IDE and mingw-9.2.0 as compiler it compiles flawlessly but if i try it with emscripten it gives those errors from the sysroot includes. Can i somewhere somehow overwrite that it won't uses the inlcudes from the cache? Thanks for you help in advance.