g++.exe: error: unrecognized command line option '-static-libstdc++' mingw32-make.exe[2]: *** [examples/ftp/ftp.exe] Error 1 mingw32-make.exe[1]: *** [examples/ftp/CMakeFiles/ftp.dir/all] Error 2 mingw32-make.exe: *** [all] Error 2 mingw32-make.exe[2]: Leaving directory `C:/SFML 2.0/projects' mingw32-make.exe[1]: Leaving directory `C:/SFML 2.0/projects' Process terminated with status 2 (7 minutes, 32 seconds) 0 errors, 0 warnings (7 minutes, 32 seconds) |
BUILD_SHARED_LIBS Unchecked CMAKE_BUILD_TYPE Release CMAKE_CODEBLOCKS_EXECUTABLE CMAKE_CODEBLOCKS_EXECUTABLE-NOTFOUND CMAKE_GNUtoMs Unchecked CMAKE_INSTALL_PREFIX C:/Program Files/SFML DOXYGEN_HHC_PROGRAM DOXYGEN_HHC_PROGRAM-NOTFOUND GLEW_INCLUDE_PATH C:/SFML 2.0/extlibs/headers GLEW_LIBRARY C:/SFML 2.0/extlibs/libs-mingw/x86/libglew.a SFML_BUILD_DOC Checked SFML_BUILD_EXAMPLES Unchecked SFML_USE_STATIC_STD_LIBS Checked |
g++.exe: error: unrecognized command line option '-static-libstdc++' |
-static-libstdc++
isn't mentioned anywhere.#include <SFML/System/Vector2.inl>
and says that the file is missing) Vidminas wrote: |
---|
CMAKE_CODEBLOCKS_EXECUTABLE CMAKE_CODEBLOCKS_EXECUTABLE-NOTFOUND |
Linking CXX executable ftp.exe cd /d C:\SFML-2.0\projects\examples\ftp && "C:\Program Files\CMake 2.8\bin\cmake.exe" -E cmake_link_script CMakeFiles\ftp.dir\link.txt --verbose=1 "C:\Program Files\CMake 2.8\bin\cmake.exe" -E remove -f CMakeFiles\ftp.dir/objects.a g++.exe: error: unrecognized command line option '-static-libstdc++' mingw32-make.exe[2]: *** [examples/ftp/ftp.exe] Error 1 mingw32-make.exe[1]: *** [examples/ftp/CMakeFiles/ftp.dir/all] Error 2 mingw32-make.exe: *** [all] Error 2 C:\MinGW-4.7.1\bin\ar.exe cr CMakeFiles\ftp.dir/objects.a @CMakeFiles\ftp.dir\objects1.rsp C:\MinGW-4.7.1\bin\g++.exe -O3 -DNDEBUG -static-libgcc -static-libstdc++ -Wl,--whole-archive CMakeFiles\ftp.dir/objects.a -Wl,--no-whole-archive -o ftp.exe -Wl,--out-implib,libftp.dll.a -Wl,--major-image-version,0,--minor-image-version,0 ..\..\lib\libsfml-network-s.a ..\..\lib\libsfml-system-s.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 mingw32-make.exe[2]: Leaving directory `C:/SFML-2.0/projects' mingw32-make.exe[1]: Leaving directory `C:/SFML-2.0/projects' Process terminated with status 2 (4 minutes, 26 seconds) 0 errors, 0 warnings (4 minutes, 26 seconds) |
Vidminas wrote: |
---|
g++.exe: error: unrecognized command line option '-static-libstdc++' |
naraku9333 wrote: |
---|
Your compiler might be to old for this option, either update mingw or change the option to something like -static-libgcc |
C:\Documents and Settings\Vidminas> cd C:\SFML-2.0\projects C:\SFML-2.0\projects>mingw32-make Makefile |
cmake -G"Unix Makefile" |
mingw32-make |
Chriscpp - I've read that many times now. |
I then got the pre-compiled binaries, which work with Code::Blocks, but I have to copy every .dll according to the libraries I use into the same directory as the executable. The tutorial doesn't mention that. |
Compile it, and if you linked to the dynamic version of SFML, don't forget to copy the SFML DLLs (they are in <sfml-install-path/bin>) to the directory where your compiled executable is. |
Vidminas wrote: |
---|
In the previous post I wrote that SFML works for me with pre-compiled libraries, I just want to compile it myself. |
To create makefiles usable with MinGW (gcc), select "MinGW makefiles". It is generally easier to generate makefiles rather than IDE projects: you can then compile with a single command, or even gather multiple compilations in a single script. Since you will only compile, not edit source files, IDE projects are generally useless. |
Vidminas wrote: |
---|
In the tutorial it says that you don't have to compile with an IDE, so I tried building just MinGW makefiles. |
Vidminas wrote: |
---|
C:\Documents and Settings\Vidminas> cd C:\SFML-2.0\projects C:\SFML-2.0\projects>mingw32-make Makefile |
Vidminas wrote: |
---|
Nothing happens... |
C:\SFML-2.0\projects>mingw32-make Makefile |
C:\SFML-2.0\projects>mingw32-make |
naraku9333 wrote: |
---|
You need to use cmake to generate a makefile first, something like cmake -G"Unix Makefile" then mingw32-make |
g++.exe: error: unrecognized command line option '-static-libstdc++' |
naraku9333 wrote: |
---|
Your compiler might be to old for this option, either update mingw or change the option to something like -static-libgcc |
Vidminas wrote: |
---|
I couldn't find where the option was stated, therefore I couldn't change it. |
# for gcc >= 4.0 on Windows, apply the SFML_USE_STATIC_STD_LIBS option if it is enabled if(WINDOWS AND COMPILER_GCC AND SFML_USE_STATIC_STD_LIBS) if(NOT GCC_VERSION VERSION_LESS "4") set_target_properties(${target} PROPERTIES LINK_FLAGS "-static-libgcc -static-libstdc++") endif() endif() |
CMake Error: Error in cmake code at C:/SFML-2.0/cmake/Macros.cmake:1: Parse error. Expected a command name, got unquoted argument with text "ļ»æ". CMake Error at src/SFML/CMakeLists.txt:3 (include): include could not find load file: C:/SFML-2.0/cmake/Macros.cmake CMake Error at src/SFML/System/CMakeLists.txt:80 (sfml_add_library): Unknown CMake command "sfml_add_library". |
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_C_COMPILER_ENV_VAR CMake Error: Could not find cmake module file:C:/SFML-2.0/projects/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_CXX_COMPILER_ENV_VAR CMake Error: Could not find cmake module file:C:/SFML-2.0/projects/CMakeFiles/2.8.10.2/CMakeCXXCompiler.cmake Configuring incomplete, errors occurred! |
[ 14%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/Thre adImpl.cpp.obj C:\DOCUME~1\Vidminas\LOCALS~1\Temp\ccouhLAq.s: Assembler messages: C:\DOCUME~1\Vidminas\LOCALS~1\Temp\ccouhLAq.s:143: Error: expecting string instr uction after `rep' C:\DOCUME~1\Vidminas\LOCALS~1\Temp\ccouhLAq.s:180: Error: expecting string instr uction after `rep' C:\DOCUME~1\Vidminas\LOCALS~1\Temp\ccouhLAq.s:204: Error: expecting string instr uction after `rep' mingw32-make[2]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadImp l.cpp.obj] Error 1 mingw32-make[1]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/all] Error 2 mingw32-make: *** [all] Error 2 |
Vidminas wrote: |
---|
When configuring Unix makefiles |