I386 architecture of input file is incompatible with i386:x86-64 output

As the title, only one can give some suggestion? The link error log is:

1> 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
1>clang++.exe : error : linker command failed with exit code 1 (use -v to see invocation)

The test header file:

#include

class TFTest
{
public:
TFTest(){};
~TFTest(){};
static void tfprint();
};

The test cpp file:

#include “tftest.h”

void TFTest::tfprint()
{
printf(“hello world\n”);
}

The compile command is :
g++ -c tftest.cpp -m32 -o tftest.o
ar -r libtftest.a tftest.o

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

Just remove -m32 altogether.