Problem building extension sample with Python 2.2.3

Discussion in 'Python' started by Bren, Jul 21, 2003.

  1. Bren

    Bren Guest

    Hi,

    I'm trying to build the sample extension file from
    http://www.python.org/doc/current/ext/simpleExample.html.

    I get a linker error:

    Linking...
    spam.obj : error LNK2001: unresolved external symbol
    __imp__Py_InitModule4TraceRefs

    Also, I find it necessary to ignore python22_d.lib and link
    python22.lib explicitly when I make a Debug build.

    I'm using MSVC++ 6.

    Any help appreciated, thanks.
     
    Bren, Jul 21, 2003
    #1
    1. Advertising

  2. =?ISO-8859-1?Q?Gerhard_H=E4ring?=, Jul 21, 2003
    #2
    1. Advertising

  3. Bren

    Bren Guest

    On Tue, 22 Jul 2003 13:53:53 GMT, Michael Hudson <>
    wrote:

    > (Bren) writes:
    >
    >> Hi,
    >>
    >> I'm trying to build the sample extension file from
    >> http://www.python.org/doc/current/ext/simpleExample.html.
    >>
    >> I get a linker error:
    >>
    >> Linking...
    >> spam.obj : error LNK2001: unresolved external symbol
    >> __imp__Py_InitModule4TraceRefs
    >>
    >> Also, I find it necessary to ignore python22_d.lib and link
    >> python22.lib explicitly when I make a Debug build.

    >
    >There's your problem, I think. You seem to be trying to build a debug
    >version of your module against a release version of Python. This
    >won't work.


    Thanks, that worked!

    Now, I am working on embedding python in a C/C++ app, so I would like
    very much to be able to debug the code in C/C++ functions when they
    are called by Python. Is it possible I could get a debug version of
    this lib/dll somewhere to let me do this? Is there a python22_d.lib?






    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
     
    Bren, Jul 22, 2003
    #3
  4. Bren

    Bren Guest

    On Tue, 22 Jul 2003 17:51:02 -0400, Bren <>
    wrote:

    >On Tue, 22 Jul 2003 13:53:53 GMT, Michael Hudson <>
    >wrote:
    >
    >> (Bren) writes:
    >>
    >>> Hi,
    >>>
    >>> I'm trying to build the sample extension file from
    >>> http://www.python.org/doc/current/ext/simpleExample.html.
    >>>
    >>> I get a linker error:
    >>>
    >>> Linking...
    >>> spam.obj : error LNK2001: unresolved external symbol
    >>> __imp__Py_InitModule4TraceRefs
    >>>
    >>> Also, I find it necessary to ignore python22_d.lib and link
    >>> python22.lib explicitly when I make a Debug build.

    >>
    >>There's your problem, I think. You seem to be trying to build a debug
    >>version of your module against a release version of Python. This
    >>won't work.

    >
    >Thanks, that worked!
    >
    >Now, I am working on embedding python in a C/C++ app, so I would like
    >very much to be able to debug the code in C/C++ functions when they
    >are called by Python. Is it possible I could get a debug version of
    >this lib/dll somewhere to let me do this? Is there a python22_d.lib?


    Nevermind, I see the answer in another thread.

    Ugh, this could be much easier...


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
     
    Bren, Jul 22, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jake
    Replies:
    0
    Views:
    563
  2. Tim Chase
    Replies:
    0
    Views:
    76
    Tim Chase
    Feb 16, 2014
  3. Terry Reedy
    Replies:
    0
    Views:
    85
    Terry Reedy
    Feb 16, 2014
  4. Tim Chase
    Replies:
    0
    Views:
    89
    Tim Chase
    Feb 16, 2014
  5. Ned Batchelder
    Replies:
    0
    Views:
    86
    Ned Batchelder
    Feb 16, 2014
Loading...

Share This Page