1
General / Re: Compiling simple SFML Project with MSVC CL Compiler in Command Prompt
« on: July 19, 2020, 01:04:10 pm »
The problem is somewhere in the compiler-/linker-options. An equivalent Visual Studio 2019 solution builds and runs the project no problem. So I just copied the compiler and linker options out of the property windows. Now it looks like this...
I dont really know why it works tho.
@ECHO OFF
cl /JMC /permissive- /GS /W3 /Zc:wchar_t /I"C:\Programming\Projekte\DSAVis\SFML-2.5.1\include"^
/ZI /Gm- /Od /sdl /Fd"vc142.pdb" /Zc:inline /fp:precise /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE"^
/D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Gd /MDd /FC /EHsc /nologo^
/diagnostics:column^
main.cpp^
/OUT:".\main.exe" /MANIFEST /NXCOMPAT^
/PDB:".\main.pdb" /DYNAMICBASE^
"SFML-2.5.1\lib\sfml-graphics-d.lib" "SFML-2.5.1\lib\sfml-system-d.lib" "SFML-2.5.1\lib\sfml-window-d.lib" "kernel32.lib" "user32.lib"^
"gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib"^
"uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /INCREMENTAL^
/PGD:".\main.pgd" /SUBSYSTEM:CONSOLE^
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:".\main.exe.intermediate.manifest"^
/ERRORREPORT:PROMPT /NOLOGO /TLBID:1
cl /JMC /permissive- /GS /W3 /Zc:wchar_t /I"C:\Programming\Projekte\DSAVis\SFML-2.5.1\include"^
/ZI /Gm- /Od /sdl /Fd"vc142.pdb" /Zc:inline /fp:precise /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE"^
/D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Gd /MDd /FC /EHsc /nologo^
/diagnostics:column^
main.cpp^
/OUT:".\main.exe" /MANIFEST /NXCOMPAT^
/PDB:".\main.pdb" /DYNAMICBASE^
"SFML-2.5.1\lib\sfml-graphics-d.lib" "SFML-2.5.1\lib\sfml-system-d.lib" "SFML-2.5.1\lib\sfml-window-d.lib" "kernel32.lib" "user32.lib"^
"gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib"^
"uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /INCREMENTAL^
/PGD:".\main.pgd" /SUBSYSTEM:CONSOLE^
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:".\main.exe.intermediate.manifest"^
/ERRORREPORT:PROMPT /NOLOGO /TLBID:1
I dont really know why it works tho.