更新时间:2022-04-08 22:01:22
是,当然,没有任何工具在其他答案中提到,但只是使用 C++ 编译器.
Yes, of course, without any tools mentioned in the other answers, but simply using the C++ compiler.
只需在您的 C++ 程序中执行这些步骤(在 linux 上,但在其他操作系统上必须类似)
just follow these steps from within your C++ program (on linux, but must be similar on other OS)
ofstream
system("c++/tmp/prog.cc -o/tmp/prog.so -shared -fPIC");
dlopen()