FACEGOOD / FACEGOOD-Audio2Face

http://www.facegood.cc
MIT License
1.8k stars 360 forks source link

How to compile LPC source code into a Linux .so file #83

Closed BarryAlllen closed 1 year ago

BarryAlllen commented 1 year ago

When I compile the "dllmain.cpp" file using GCC on Windows and generate the "LPC.so" file, and then try to run it on Linux, I still encounter the error: "OSError: ./lib/tensorflow/LPC.so: invalid ELF header."

BarryAlllen commented 1 year ago

It's driving me crazy.

SZNero commented 1 year ago

just use the LPC.h LPC.cpp and lpcfunc.h file. dllmain.cpp is not need. And compile them in linux with GCC

BarryAlllen commented 1 year ago

I tried to compile the three files you mentioned into a .so file on Linux directly, but I still encountered errors. Do I need to modify the content in the source code? I'm not very familiar with C++.

annmusic commented 1 year ago

just use the LPC.h LPC.cpp and lpcfunc.h file. dllmain.cpp is not need. And compile them in linux with GCC

i am experiencing the same problem, the .h file include some header files for window, so how to modify these to work with Linux.

SZNero commented 1 year ago

this is a example for how to create LPC.so in linux with cmake. libLPC.zip