By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,918 Members | 2,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,918 IT Pros & Developers. It's quick & easy.

Problem with __attribute__

P: n/a
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
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Krzysztof Kolago" <kr**************@wp.pl> wrote...
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
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.