LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Swfdec issues on MinGW (Windows) (https://www.linuxquestions.org/questions/programming-9/swfdec-issues-on-mingw-windows-4175420508/)

ntubski 08-14-2012 10:51 AM

Quote:

Originally Posted by c0d3d (Post 4753582)
Can you tell me where python-config is located? When I run it directly, I get a "command not found" error.

Well that sounds like the problem then. I would guess it should be located somewhere in the python installation. If you can put the flags in yourself (see below) then you don't need to find it.

Quote:

When I run build, I would run it like this (that was the command on the webpage, the only thing being changed is "-lpython32" instead of "-python27"):
Code:

build -L$PYTHON_LIB -lpython32

-L$PYTHON_LIB -lpython32 should go inside build, after (or instead of) $(python-config --ldflags).

c0d3d 08-14-2012 04:17 PM

Quote:

Originally Posted by ntubski (Post 4753974)
-L$PYTHON_LIB -lpython32 should go inside build, after (or instead of) $(python-config --ldflags).

When I run the command "g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -L../../framework -lmlt -L$PYTHON_LIB -lpython32 -o _mlt.so", I get:
Code:

c:/mingw/bin/../lib/gcc/mingw32/4.7.0/../../../../mingw32/bin/ld.exe: cannot find -lpython32
collect2.exe: error: ld returned 1 exit status

Any ideas?

ntubski 08-14-2012 07:05 PM

The instructions are wrong, actually.
Quote:

3. set environment variables for PYTHON_INCLUDE and PYTHON_LIB per http://www.swig.org/Doc1.3/Windows.html#Windows_python

4. build manually using src/swig/python/build as a guide

need to add "-L$PYTHON_LIB -lpython27"
Looking at http://www.swig.org/Doc1.3/Windows.html#Windows_python, we see that $PYTHON_LIB is the path to the python library. The -L option is supposed to tell the linker which directory to find libraries in.

I believe -l$PYTHON_LIB would work. Alternatively, PYTHON_LIBDIR=D:\python21\libs, and -L$PYTHON_LIBDIR -lpython21, changing version numbers as appropriate.

c0d3d 08-18-2012 05:55 PM

Since compiling MLT has been very difficult for me, as a beginner, I am trying a new toolkit, SFML. I will see how that goes.
There are a lot of programming skills I am lacking, also, so I'm giving up for now.
Thank you for all the help you have given me.

Sincerely,
c0d3d


All times are GMT -5. The time now is 09:57 PM.