Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22024

gcc library in different location of the executable, at runtime?

$
0
0

I wrote a C application which uses some python code:

#include <Python.h>int main() {    ....    Py_Initialize();    PyRun_SimpleString("print('Hello World from Embedded Python!!!')");    Py_Finalize();    ...}

I'm on Windows and I compile using gcc in MinGW:

gcc app.c -o C:\\app\\app.exe `pkg-config --cflags --libs python3`

Then I manually copy libpython3.8.dll, which I find in MinGW folder, in C:/app, or app.exe will say "libpython3.8.dll not found"

I want that the main folder contains only the executable, so is there an option to say that libpython3.8.dll will be in app/lib and not in app, or to embed libpython3.8.dll into the executable?


Viewing all articles
Browse latest Browse all 22024

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>