1

Too those who know how, this may be a stupid question, but I'll be asking it anyway because I need some pointers.

The library I'm trying to compile is the SPro toolkit for speech signal processing which is written in (for lack of a better description) Gnu C++

It's a library written for unix and I want to compile it in windows. As much as an object exercise in porting code from, as anything.

Toward that end I have installed code::blocks and a MinGW compiler. I read that I could also use cgywn and that this would be introducing a layer interpreting the gnu c before executing it natively, but let me leave that to the side for the moment.

The first issue I ran into was that the #includes need a little love - ok no problem with that.

But now I find that

scopy.c|462|error: 'SIZEOF_SHORT' undeclared (first use in this function)|

I also installed visual Studio C++ and get the same.

I gather that SIZEOF_CHAR, SIZEOF_SHORT, SIZEOF_LONG, SIZEOF_FLOAT and SIZEOF_DOUBLE would be declared, in a header or somewhere.

Unfortunalty I don't have any idea where, so have no idea what to include to have access to the definitions.

What should I include?

Do I need to define these constants myself as I am in a different environment?

Also I may be barking up the wrong tree, any help is appreciated.

3
  • run cygwin and then compile gnu c++ . It may help Commented Feb 17, 2014 at 4:58
  • Why would SIZEOF_SHORT, etc., be declared anywhere? They're not part of any standard I'm aware of. Commented Feb 17, 2014 at 5:00
  • They would be declared in the spro code if they were not system defined. There are no dependencies. But they are not in the spro code. i was thinking a lowlevel c compiler may define them as a way to allow them to be redefined for portability. Commented Feb 17, 2014 at 5:05

1 Answer 1

1
#define SIZEOF_SHORT sizeof(short)
#define SIZEOF_CHAR sizeof(char)

Repeat for all other types.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.