Problem with __attribute__

K

Krzysztof Kolago

Hello!

I've download some header files from Internet and I've tried to use them
in my program, but Borland C++ Builder is stopping, when it reach this
structure:

struct fann_neuron
{
fann_type *weights;
struct fann_neuron **connected_neurons;
unsigned int num_connections;
fann_type value;
}__attribute__((packed));

On the last line of this structure Builder wrote that there - before
"packed" word - ")" was expected. How should I modificate header file, if I
want to compile my program with success? Example programs' sources are
stopping on the same line.

Chris
 
V

Victor Bazarov

Krzysztof Kolago said:
I've download some header files from Internet and I've tried to use them
in my program, but Borland C++ Builder is stopping, when it reach this
structure:

struct fann_neuron
{
fann_type *weights;
struct fann_neuron **connected_neurons;
unsigned int num_connections;
fann_type value;
}__attribute__((packed));

On the last line of this structure Builder wrote that there - before
"packed" word - ")" was expected. How should I modificate header file, if I
want to compile my program with success? Example programs' sources are
stopping on the same line.

Remove everything between the closing '}' and the ';'. The
__attribute__ macro (my guess) is not standard C++. Probably
the author of the code used a compiler that had that extension
and you use one that doesn't.

Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top