Hi,
I tried compiling the latest trunk version (2481). With gcc on linux and I got this error (I'm using cmake):
Building CXX object CMakeFiles/angelscript.dir/home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/sdk/angelscript/source/as_atomic.cpp.o
/usr/bin/c++ -D-fPIC -DANGELSCRIPT_EXPORT -D_LIB -I/home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/sdk/angelscript/projects/cmake/../../include -O2 -g -DNDEBUG -o CMakeFiles/angelscript.dir/home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/sdk/angelscript/source/as_atomic.cpp.o -c /home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/sdk/angelscript/source/as_atomic.cpp
<komentorivi>:0:1: virhe: makrojen nimien on oltava tunnisteita
make[2]: *** [CMakeFiles/angelscript.dir/build.make:63: CMakeFiles/angelscript.dir/home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/sdk/angelscript/source/as_atomic.cpp.o] Virhe 1
make[2]: Poistutaan hakemistosta ”/home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/build”
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/angelscript.dir/all] Virhe 2
make[1]: Poistutaan hakemistosta ”/home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/build”
make: *** [Makefile:130: all] Virhe 2
The interesting part here is `-D-fPIC` which is the cause of the error. I was able to fix this by changing this configuration `target_compile_definitions(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE -fPIC)` to this: `target_compile_options(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE -fPIC)`. I changed the compile definition to be compile option which correctly no longer adds `-D` in front of `-fPIC`. I Also added a check to the if condition that contains that setting to include check for UNIX as I think as it currently is it won't work on windows (I also use cmake with angelscript on windows, but didn't test that yet).
I included a diff of the change.