Can I use g++ replace clang on DS compile?

In our project, we considered use some API compiled with g++, but we found the API not compatible when link with clang compiler, It is possible to replace clang with g++ on dedicated server compile?

We haven’t tried compiling with gcc recently, but when we did (in early 2014), some code changes were needed. So you can compile with gcc, but you will have to change a few things in the engine (and UBT probably, although changes to the latter are rather cosmetic).

That said, clang and gcc are compatible and you may want to investigate that link error to make sure it is not caused by anything else.

P.S. I assume Linux of course.

Thanks a lot!we will do some work for clang and gcc compatible feature! Actually, we found the incompatible reason is :
C:\CrossToolchain\bin\x86_64-unknown-linux-gnu-ld.exe: i386 architecture of input file `J:/UnrealEngine-4.6/Engine/Source/ThirdParty/Test/lib/libtftest.a(tftest.o)’ is incompatible with i386:x86-64 output
I am extremely grateful for RCL can give some suggestion in my question:

The target executable file ix elf64, change -m32 to -m64 solve this problem! g++ -c tftest.cpp -m64 -o tftest.o ar -r libtftest.a tftest.o

In our project, we used GCC compiled third part library and run correctly!

Third party libraries are fine since object files produced by clang and gcc are fully compatible (some of the libs bundled with UE4 are compiled with gcc), but to compile the engine itself you’d need more work