[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cybop-developers] CodeBlock project file

From: Enrico Gallus
Subject: [cybop-developers] CodeBlock project file
Date: Sat, 11 Mar 2017 12:42:56 +0900

Hi Kevin,

Maybe you could send me the error message so we would have a chance to fix
the bug which obviously occurs under Mac OS X.
I appreciate that!

Here information about the version which is preinstalled on mac os x:
perl -v

This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)

Here the max possible output i could force:

perl -Mdiagnostics=-traceonly 
binmode() on closed filehandle $in at line 17.
read() on closed filehandle $in at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/XML/ line 744.
Uncaught exception from user code:
read error at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/XML/ line 884. at line 18.
XML::LibXML::parse_fh('XML::LibXML=HASH(0x7ff2b2335d40)', 'GLOB(0x7ff2b20034e8)', undef) called at /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/XML/ line 770
XML::LibXML::load_xml('XML::LibXML', 'IO', 'GLOB(0x7ff2b20034e8)') called at line 18

The perl script is just replacing the file tree within the project file.
So if you finished to switch from make to cmake, you may get the project
file to call cmake instead of make. You would just have to update the
project file which is checked in and the perl script should work as usual.

If you have further questions, feel free to ask.
The project structure changed a bit. Since a couple of days there exists another directory containing c-files which is situation directly under root. It is called ‘test' and contains the test files.

I am not familiar enough with CodeBlocks to tell if it would be enough and a good solution to just add the test files to the project node as well in the perl script.
The executable are created together with the cmake of the source. Hm, now thinking about that, maybe I should make it possible to target the cmake in test independent as well..
What would you recommend how should the tests c-files be added in the code block project file? Just as nodes as well? different project with separated target?

I had a look at the script and i have a proposal for an improvement. To reduce the code-redundancy, .c and .h files could be load into files.
Depending on the file ending the option-child-node is added or not.

#Read out files
my @files = File::Find::Rule->file()
                            ->name( '*.c''*.h' )
                            ->in( getcwd . '/src' );
#And write nodes
for my $file (@files) {
    my @pieces = split(/src/$file);
    my $correctPath = "../../src" . $pieces[1];
    my $node = XML::LibXML::Element->new("Unit");

    # add option node to c-files
    if ($correctPath =~ /.c$/) {
        my $optionNode = XML::LibXML::Element->new("Option");



#Save document

After checking the script i realised that it is expected to execute the script from the root-directory and not from the directory where the script is situated.

So the script works, looks like the above printed error means, ‘could not find the file’.
But after the execution another problem showed up.

The unbind node leaves a lot of empty lines and the xml-handling which adds the new nodes does not handle the newline correctly at least on my system.
I attached the resulting CYBOI.cbp. Any proposals how to fix this?

Best wishes




Attachment: CYBOI.cbp
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]