I thought were supposed to be able to set all the libraries in one variable but it doesn't seem to work, if i replace the lin libraries with the variable i get a TON of error becuase the compiler don't seem to link the libraries.
How can this be solved?
THIS WORKS:
@echo off
IF NOT DEFINED winLibs SET winLibs = user32.lib gdi32.lib winmm.lib Opengl32.lib ws2_32.lib advapi32.lib
IF NOT DEFINED sfmlDependLibsX64 (SET sfmlDependLibsX64 = /LIBPATH:"C:\SFML\SFML-2.5.1_x64\lib" freetype.lib openal32.lib flac.lib vorbisenc.lib vorbisfile.lib vorbis.lib ogg.lib)
IF NOT DEFINED sfmlDependLibsX86 (SET sfmlDependLibsX86 = /LIBPATH:"C:\SFML\SFML-2.5.1_x86\lib" freetype.lib openal32.lib flac.lib vorbisenc.lib vorbisfile.lib vorbis.lib ogg.lib)
If NOT EXIST ..\buildx64 mkdir ..\buildx64
If NOT EXIST ..\buildx86 mkdir ..\buildx86
pushd ..\buildx64
cl /MD /EHsc -Zi -nologo /I ..\include ..\src\CJsfml_001.cpp /link user32.lib gdi32.lib winmm.lib Opengl32.lib ws2_32.lib advapi32.lib /LIBPATH:"C:\SFML\SFML-2.5.1_x64\lib" freetype.lib openal32.lib flac.lib vorbisenc.lib vorbisfile.lib vorbis.lib ogg.lib sfml-system-s.lib sfml-graphics-s.lib sfml-window-s.lib sfml-audio-s.lib sfml-network-s.lib
popd
:: ------------------ x86 BUILD (set vcvarsx86) -----------------
:: pushd ..\buildx86
::
:: cl /MD /EHsc -Zi -nologo /I ..\include ..\src\CJsfml_001.cpp user32.lib gdi32.lib winmm.lib Opengl32.lib ws2_32.lib advapi32.lib /link /LIBPATH:"C:\SFML\SFML-2.5.1_x86\lib" freetype.lib openal32.lib flac.lib vorbisenc.lib vorbisfile.lib vorbis.lib ogg.lib sfml-system-s.lib sfml-graphics-s.lib sfml-window-s.lib sfml-audio-s.lib sfml-network-s.lib
::
::
:: popd
del *.~ *.cpp~ *.bat~ *.un~
when i replace the libraires with the variables set at the top of the script it doesn't work.
THIS DOESN'T WORK:
@echo off
IF NOT DEFINED winLibs (SET winLibs = user32.lib gdi32.lib winmm.lib Opengl32.lib ws2_32.lib advapi32.lib)
IF NOT DEFINED sfmlDependLibsX64 (SET sfmlDependLibsX64 = /LIBPATH:"C:\SFML\SFML-2.5.1_x64\lib" freetype.lib openal32.lib flac.lib vorbisenc.lib vorbisfile.lib vorbis.lib ogg.lib)
IF NOT DEFINED sfmlDependLibsX86 (SET sfmlDependLibsX86 = /LIBPATH:"C:\SFML\SFML-2.5.1_x86\lib" freetype.lib openal32.lib flac.lib vorbisenc.lib vorbisfile.lib vorbis.lib ogg.lib)
IF NOT DEFINED sfmlLibsX64 (SET sfmlLibsX64 = /LIBPATH:"C:\SFML\SFML-2.5.1_x64\lib"sfml-system-s.lib sfml-graphics-s.lib sfml-window-s.lib sfml-audio-s.lib sfml-network-s.lib)
IF NOT DEFINED sfmlLibsX86 (SET sfmlLibsX86 = /LIBPATH:"C:\SFML\SFML-2.5.1_x86\lib"sfml-system-s.lib sfml-graphics-s.lib sfml-window-s.lib sfml-audio-s.lib sfml-network-s.lib)
If NOT EXIST ..\buildx64 mkdir ..\buildx64
If NOT EXIST ..\buildx86 mkdir ..\buildx86
pushd ..\buildx64
cl /MD /EHsc -Zi -nologo /I ..\include ..\src\CJsfml_001.cpp %winLibs% /link /LIBPATH:"C:\SFML\SFML-2.5.1_x64\lib" %sfmlDependLibsX64% %sfmlLibsX64%
popd
:: ------------------ x86 BUILD (set vcvarsx86) -----------------
:: pushd ..\buildx86
::
:: cl /MD /EHsc -Zi -nologo /I ..\include ..\src\CJsfml_001.cpp user32.lib gdi32.lib winmm.lib Opengl32.lib ws2_32.lib advapi32.lib /link /LIBPATH:"C:\SFML\SFML-2.5.1_x86\lib" freetype.lib openal32.lib flac.lib vorbisenc.lib vorbisfile.lib vorbis.lib ogg.lib sfml-system-s.lib sfml-graphics-s.lib sfml-window-s.lib sfml-audio-s.lib sfml-network-s.lib
::
::
:: popd
del *.~ *.cpp~ *.bat~ *.un~