Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6191357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:44:57+00:00 2026-05-24T02:44:57+00:00

i built a static library,and add the .h file to my project, in all

  • 0

i built a static library,and add the .h file to my project,

in all the class in the .h files,something like this :

class StartOp
{
    static void openFiles(WavInFile **inFile, WavOutFile **outFile, const RunParameters *params);
    static void setup(SoundTouch *pSoundTouch, const WavInFile *inFile, const RunParameters *params);
    static void process(SoundTouch *pSoundTouch, WavInFile *inFile, WavOutFile *outFile);
    static void detectBPM(WavInFile *inFile, RunParameters *params);
    int start(const int nParams, const char * const paramStr[]);
};

i got this error:

StartOp.h:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'StartOp'

**EDIT**

i fix this problem by changing the file ex to mm.
now i want to use this code and i want to call from this class ,this code is an c++ class that i want to call him from an objective-c class:

#ifndef _STARTOP_H_
#define _STARTOP_H_

namespace soundtouch
{

    class StartOp
    {
        static void openFiles(WavInFile **inFile, WavOutFile **outFile, const RunParameters *params);
        static void setup(SoundTouch *pSoundTouch, const WavInFile *inFile, const RunParameters *params);
        static void process(SoundTouch *pSoundTouch, WavInFile *inFile, WavOutFile *outFile);
        static void detectBPM(WavInFile *inFile, RunParameters *params);
        static int start(const int nParams, const char * const paramStr[]);
    };
}



#endif

to the
static int start(const int nParams, const char * const paramStr[]);

method from my objective-c iphone app.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:44:57+00:00Added an answer on May 24, 2026 at 2:44 am

    The code you posted is not C; it is rather C++.

    Now, Objective-C and C++ can interoperate, but you need to use .mm extensions on the Objective-C side.

    So if you are importing the .h. file into a .m file, you get obviously errors because the compiler is not expecting a class definition (C++). If you import the .h file into a .mm file, you have some chance that it will work (if all the rest is correct, I mean).

    If you need more help, please provide more code, so that we can understand better what you are doing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a shared library project that is built from 4 static libraries (
Is it possible to link a static library built with VS2005 into an application
I'm interested in verifying if a given iPhone static library has been built for
This is an iOS question. I build a static library (a framework in iOS)
I would like to build a static version of QT Library for X11 like
I've followed this tutorial for setting up a static library with common classes from
I've built yamlcpp static (libyaml-cpp.a) library using Qt's mingw compiler. Now I want to
I'm using QuickFAST library and while checking it I found this class declaration which
Greetings all, I have a static library which I later link with my application.
I am trying to create a static library in Xcode using C++ ( All

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.