Boost logo

Boost :

From: rwgk_at_[hidden]
Date: 2001-04-05 14:17:31


I had a similar problem a week or so ago. In my case it turned
out that VC did not deal correctly with inline functions.
Trying to make up an example:

    struct XXX {
        bool generic(int a, int b);
        inline bool specific_1(int a) { return generic(a, 1); }
        inline bool specific_2(int a) { return generic(a, 2); }
    };

The link error occurred when I tried to wrap specific_1()
and specific_2() simultaneously.

Possible solution: remove the "inline" keywords.
If you find this too intrusive, define free functions like:

    bool XXX_specific_1(const XXX& x, int a) {
        return x.specific_1(a);
    }

def these free functions. E.g., replace

    py_XXX.def(&XXX::specific_1, "specific_1")
by
    py_XXX.def(XXX_specific_1, "specific_1")

Hope this is related to your problem...
        Ralf

--- In boost_at_y..., rcspython_at_y... wrote:
> Strange problem here...
> I have been using the wrapper with success on a subset of the
methods
> that I want to export to python. Last night I attempted to go ahead
> and expose the rest. They all have unique names and use simple data
> types as args/rets.
>
> Visual C++ 6.0 SP5 Win 2K Server Sp1
> I am getting this error when I rebuild:
>
> Linking...
> PTwrapper.obj : fatal error LNK1179: invalid or corrupt file:
> duplicate comdat "?def@?$class_builder_at_VVruport@@V?
>
$held_instance_at_VVruport@@@detail_at_python@boost@@@python_at_boost@@QAEXP8Vr
> uport@@AE_N_N_at_ZPBD@Z"
> Error executing link.exe.
>
> It is NOT at all obvious what could be causing this problem.
> When I comment out CERTAIN of the exposed methods the link error
goes
> away. Some methods seem to have a dependency on others (ODD). It
> happens under Debug and Release builds and Boost Python Lib builds
> 1_20_2, 1_21_1.
>
> ANY help would be greatly appreciated as I am pulling out so much
> hair I am going bald.
>
> Best Regards!
> Ron


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk