Re: [pygccxml-development] Re : Re : Re : Re : Re : Compilation problem
Brought to you by:
mbaas,
roman_yakovenko
|
From: Roman Y. <rom...@gm...> - 2008-06-10 05:56:57
|
On Tue, Jun 10, 2008 at 1:42 AM, Vincent Ferries
<vin...@gm...> wrote:
>
>
> 2008/6/9 Roman Yakovenko <rom...@gm...>:
>>
>> On Mon, Jun 9, 2008 at 6:35 PM, Vincent Ferries
>> <vin...@gm...> wrote:
>> > I now include my cpp code with the directive :
>> > mb.code_creator.add_include(myCorrespondingCppFile.cpp)
>> >
>> > Is this the right way to do it?
>>
>> No. I generally doesn't include cpp files.
>>
>> I think the problem is here(scons file):
>>
>> def get_py_ferespost_files():
>> source_files = filter(lambda s: s.endswith('.cpp'),
>> os.listdir(settings.generated_files_dir))
>> return map(lambda fname: os.path.join(settings.generated_files_dir,
>> fname), source_files)
>
> I currently use this method to generate the library from the generated
> source.
>
>>
>> If you generate code to a directory other than wrapped library code,
>> than the cpp files of the library ( forepost )is not included into the
>> build. Just update your scons.
>
> That's the case, but there are many folders (and subfolders) where the
> sources are.
> I don't know where I need to generate and how I can manage all the
> dependencies.
This question is not related to Py++. I suggest you to read SCONS documentation.
>>
>> > And another question (yes, again...).
>> > The project I'm trying to wrap is quite complex and has a lot of
>> > cross-dependencies.
>> > (a file A including another file B which include A for example).
>> > I don't know how to déclare such dependencies using py++.
>> > Any help would be appreciated.
>>
>> What do you mean "to declare dependencies"?
>
> If I understand what you were saying, I can declare all the .h files into
> one same .h file and compile it to make the full library.
>
> Then, I have to compile all the .cpp sources and generated .cpp together to
> compile my .so file?
No. You'd better compiler the project to standalone library and than
add it to the link line.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|