Quantcast

Re: [C++-sig] C++-sig Digest, Vol 26, Issue 9

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [C++-sig] C++-sig Digest, Vol 26, Issue 9

anewtroll

    Dear Eric and Ralph, thanks a lot for your answers. It was quick and helpful !

       ANT.


[hidden email] a écrit :
Send C++-sig mailing list submissions to
	[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
	http://mail.python.org/mailman/listinfo/c++-sig
or, via email, send a message with subject or body 'help' to
	[hidden email]

You can reach the person managing the list at
	[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of C++-sig digest..."
  

Today's Topics: 1. boost, const and problem (anewtroll) 2. boost, const and problems (anewtroll) 3. Re: boost, const and problems (Eric Jardim) 4. Re: boost, const and problems (Ralf W. Grosse-Kunstleve)



Sujet:
[C++-sig] boost, const and problem
Expéditeur:
anewtroll [hidden email]
Date:
Fri, 09 Sep 2005 12:15:14 +0200
Destinataire:
[hidden email]
Destinataire:
[hidden email]


    Hi !

       As a newbie to boost.python, I would like to know why the "const" argument (i.e. void function(const float t){ ... }) causes an error when using the bjam (VC++6)


C:\test_09_net>bjam -sTOOLS=msvc
...found 1598 targets...
...updating 4 targets...
vc-C++ bin\test_09_net\nlib.pyd\msvc\debug\threading-multi\nlib.obj
nlib.cpp
C:\boost_1_33_0\boost/python/class.hpp(543) : error C2665: 'get_signature' : none of the 4 overloads can convert parameter 1 from type 'bool (__thiscall ncell::*)(const float,const class ntype &)'
C:\boost_1_33_0\boost/python/class.hpp(237) : see reference to function template instantiation 'void __cdecl boost::python::class_<class ncell,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified>::def_impl(class ncell *,const char *,bool (__thiscall ncell::*)(const float,const class ntype &),const struct boost::python::detail::def_helper<char const *,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified> &,...)' being compiled
C:\boost_1_33_0\boost/python/class.hpp(544) : error C2780: 'class boost::python::api::object __cdecl boost::python::make_function(F,const CallPolicies &,const KeywordsOrSignature &)' : expects 3 arguments - 4 provided

[...]

...skipped <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.CMD for lack of <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.obj...
...skipped <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.pyd for lack of <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.CMD...
...skipped <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.lib for lack of <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.CMD...
...failed updating 1 target...
...skipped 3 targets...


       Whereas when const is omitted no problem occurs.

       I also would like to know how to modify the C++ compilation parameters when calling the bjam command (where is the bjam config file ?). Thanks a lot !

          ANT.



Sujet:
[C++-sig] boost, const and problems
Expéditeur:
anewtroll [hidden email]
Date:
Fri, 09 Sep 2005 13:17:29 +0200
Destinataire:
[hidden email]
Destinataire:
[hidden email]


   Hi !

      As a newbie to boost.python, I would like to know why the "const" argument (i.e. void function(const float t){ ... }) causes an error when using the bjam (VC++6)

------------------------------------------------------------
C:\test_09_net>bjam -sTOOLS=msvc
...found 1598 targets...
...updating 4 targets...
vc-C++ bin\test_09_net\nlib.pyd\msvc\debug\threading-multi\nlib.obj
nlib.cpp
C:\boost_1_33_0\boost/python/class.hpp(543) : error C2665: 'get_signature' : none of the 4 overloads can convert parameter 1 from type 'bool (__thiscall ncell::*)(const float,const class ntype &)'
C:\boost_1_33_0\boost/python/class.hpp(237) : see reference to function template instantiation 'void __cdecl boost::python::class_<class ncell,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified>::def_impl(class ncell *,const char *,bool (__thiscall ncell::*)(const float,const class ntype &),const struct boost::python::detail::def_helper<char const *,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified> &,...)' being compiled
C:\boost_1_33_0\boost/python/class.hpp(544) : error C2780: 'class boost::python::api::object __cdecl boost::python::make_function(F,const CallPolicies &,const KeywordsOrSignature &)' : expects 3 arguments - 4 provided

[...]

...skipped <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.CMD for lack of <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.obj...
...skipped <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.pyd for lack of <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.CMD...
...skipped <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.lib for lack of <@test_09_net\nlib.pyd\msvc\debug\threading-multi>nlib.CMD...
...failed updating 1 target...
...skipped 3 targets...
------------------------------------------------------------

      Whereas when const is omitted no problem occurs.

      I also would like to know how to modify the C++ compilation parameters when calling the bjam command (where is the bjam config file ?). Thanks a lot !

         ANT.




Sujet:
Re: [C++-sig] boost, const and problems
Expéditeur:
Eric Jardim [hidden email]
Date:
Fri, 9 Sep 2005 10:02:56 -0300
Destinataire:
Development of Python/C++ integration [hidden email]
Destinataire:
Development of Python/C++ integration [hidden email]

2005/9/9, anewtroll <[hidden email]>:
    Hi !
       As a newbie to boost.python, I would like to know why the "const"
argument (i.e. void function(const float t){ ... }) causes an error when
using the bjam (VC++6)

Could you show some of the code you exposed and the class?

Or even better, can you reduce your problem to a single class with a single method and reproduce the error?
 
It would help.

[Eric Jardim]



Sujet:
Re: [C++-sig] boost, const and problems
Expéditeur:
"Ralf W. Grosse-Kunstleve" [hidden email]
Date:
Fri, 9 Sep 2005 22:22:50 -0700 (PDT)
Destinataire:
[hidden email]
Destinataire:
[hidden email]

2005/9/9, anewtroll [hidden email]:
    
Hi !
As a newbie to boost.python, I would like to know why the "const"
argument (i.e. void function(const float t){ ... }) causes an error when
using the bjam (VC++6)
      

IIRC, this is a general VC6 bug; "const float" or similar doesn't work with
that compiler.
Ralf


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

  

_______________________________________________ C++-sig mailing list [hidden email] http://mail.python.org/mailman/listinfo/c++-sig

_______________________________________________
C++-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/c++-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[C++-sig] Posting Ettiquette

David Abrahams
anewtroll <[hidden email]> writes:

>     Dear Eric and Ralph, thanks a lot for your answers. It was quick and helpful !
>
>        ANT.
>

<snip entire digest>

1. Please don't reply to digests
2. Please don't overquote

http://www.boost.org/more/discussion_policy.htm#quoting

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

_______________________________________________
C++-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/c++-sig
Loading...