BOOST confuses me: a few assumptions: true or false.....

Discussion in 'Python' started by Osiris, Jan 1, 2007.

  1. Osiris

    Osiris Guest

    I read a lot of the html pages on installing boost etc. Still a lot of
    confusion.

    Here is what I want:
    I have old, stable wonderful C-code I want to use in Python projects.
    So I encapsulate the C-code in some C++ stuf and try to compile it
    into a DLL.

    1: I DL-ed boost_1_33_1.exe (I use WinXP) and unpacked to D:\boost
    2: I started my MS Visual C++ 2005 and told the Studio that my
    python2.4 includes and libs are at c:\python24\include and
    c:\python24\libs
    3: I found the project in D:\boost\libs\python\build\VisualStudio and
    Studio converted that to the 8.0 version of my VC.
    4: I compiled and got stuff in D:\boost\libs\python\build\bin-stage:
    208.896 boost_python.dll
    99.090 boost_python.exp
    166.216 boost_python.lib
    532.480 boost_python_debug.dll
    99.102 boost_python_debug.exp
    168.490 boost_python_debug.lib
    6.450.176 boost_python_debug.pdb
    (the numbers are sizes)

    Am I now set up to start on my own projects ?

    Do I need bjam from here on ? or can I continue to do my own projects
    in VC ?

    do I need all the stuff in the folders like D:\boost\libs\* (except
    D:\boost\libs\python) ? they do not seem to be used till now...


    here is an example of mine, to play around with:
    However, I get the compile log (http://213.10.133.192/BuildLog.htm)

    ========================================
    #include <stdlib.h>
    #include <stdafx.h>

    namespace { // Avoid cluttering the global namespace.

    int my_int; /* a global integer: or outside namespace ? */
    double calc ( double f)
    {
    my_int = (int) (f/2);
    // printf( "Half of %f is %d\n", f, my_int );
    return f/2;
    }

    }

    #include <boost/python.hpp>

    using namespace boost::python;

    BOOST_PYTHON_MODULE( half )
    {
    def("calc", calc );
    }
    Osiris, Jan 1, 2007
    #1
    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. Siemel Naran

    Does true ^ true return false?

    Siemel Naran, Jun 17, 2004, in forum: C++
    Replies:
    19
    Views:
    659
    Chris Theis
    Jun 18, 2004
  2. Pierre Quentel

    "0 in [True,False]" returns True

    Pierre Quentel, Dec 12, 2005, in forum: Python
    Replies:
    59
    Views:
    1,025
    Grant Edwards
    Dec 16, 2005
  3. André
    Replies:
    3
    Views:
    1,574
  4. bdb112
    Replies:
    45
    Views:
    1,334
    jazbees
    Apr 29, 2009
  5. Shea Martin

    false or true == true .... WTF?

    Shea Martin, Apr 5, 2007, in forum: Ruby
    Replies:
    4
    Views:
    102
    Bertram Scharpf
    Apr 5, 2007
Loading...

Share This Page