[ad_1]
I found this example over the internet, on how to use librsvg, it compiles on mingw, and it runs, but it does not run outside mingw context. (For example going to explorer and double clicking the file).
The error is:
the code execution cannot proceed because librsvg-2-2.dll was not found. reinstalling the program may fix this problem.
the code execution cannot proceed because libcairo-2.dll was not found. reinstalling the program may fix this problem.
Now, I want to run this code outside mingw, but it doesn’t find the cairo and librsvg dlls, (I have no .dlls only .dll.a files), running it inside mingw works perfectly.
These are my compilation flags. (I changed the name from main.c to main.cpp)
How can I make this code run, in this case?
g++ -c main.cpp -o main.o -I/mingw64/include/librsvg-2.0 -I/mingw64/include/glib-2.0 -I/mingw64/lib/glib-2.0/include -I/mingw64/include/cairo -I/mingw64/include/gdk-pixbuf-2.0
g++ main.o -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread /mingw64/lib/libcairo.dll.a /mingw64/lib/librsvg-2.dll.a -o main.exe
[ad_2]