Re: python , Boost and straight (but complex) C code



On Sun, 31 Dec 2006 01:01:29 +0100, Christophe Cavalaria
<chris.cavalaria@xxxxxxx> wrote:

Osiris wrote:

On Sat, 30 Dec 2006 13:19:28 -0800, Erik Max Francis <max@xxxxxxxxxxx>
wrote:

Osiris wrote:

I have these pieces of C-code (NOT C++ !!) I want to call from Python.
I found Boost.
I have MS Visual Studio 2005 with C++.

is this the idea:
I write the following C source file:
============================
#include <iostream>
#include <stdafx.h>

namespace { // Avoid cluttering the global namespace.

iostream and namespaces are both most definitely C++ features, not C.

yes, but C can be compiled with a C++ compiler, One can put C code in
C++ source.... Boost should not complain... should it ?
Boost text is all about C++.. so... C should not be a problem...

Not all C code can be compiled by a C++ compiler. And anyway, this is
definitively NOT C code.

ok ok,
but the examples of the application of boost only show how to do C++.
So I followed those examples and try to embed my C code in the
framework of the examples...
Which seems not to be without merit, because my example here compiles
ok, but the linking into a DLL goes wrong, looking at the log.
I told VC where the boost libs are, and still....
.



Relevant Pages

  • Re: python , Boost and straight (but complex) C code
    ... I write the following C source file: ... namespace {// Avoid cluttering the global namespace. ... Boost should not complain... ... Not all C code can be compiled by a C++ compiler. ...
    (comp.lang.python)
  • preprocessor implementation GURU question
    ... I'm trying to resolve a disagreement between friends --Digital Mars ... The problem arose when I was trying to compile a boost example program ... compiler shouldn't be adding a space. ... involve concatenation, as it does not cause tokens to merge. ...
    (comp.lang.cpp)
  • Re: Copy constructors
    ... One of these days I must explore the "boost" library, ... I expect the boost::noncopyable class does the same thing, as the compiler ... can't generate the defaults in derived classes if the base class versions ... the empty base class optimization. ...
    (microsoft.public.vc.language)
  • Re: generic way to access C++ libs?
    ... The fact that Windows is the only widespread OS where getting a compiler ... Boost does refuse to make any assumptions, ... > assumptions could be built into Pyste. ...
    (comp.lang.python)
  • Re: python , Boost and straight (but complex) C code
    ... namespace {// Avoid cluttering the global namespace. ... yes, but C can be compiled with a C++ compiler, One can put C code in ... Boost should not complain... ...
    (comp.lang.python)