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

  • Home
  • SEARCH
  • 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 8996279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:44:00+00:00 2026-06-15T23:44:00+00:00

When compiling my C++ for an iOS project, all proceeds just fine. However, I’m

  • 0

When compiling my C++ for an iOS project, all proceeds just fine. However, I’m encountering difficulties on Android.

My Application.mk reads:

APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-11
APP_STL := stlport_shared

All the LOCAL_SRC_FILES are defined.

When I try to build my module I get the following compiler error:

jni/Game.hpp: In member function 'const std::pair<pos, Obj*>* MyEnumerator::next()':
jni/Game.hpp:126:23: error: expected type-specifier
jni/Game.hpp:126:23: error: cannot convert 'int*' to 'std::pair<pos, Obj*>*' in assignment
jni/Game.hpp:126:23: error: expected ';'

The line of code referred to above reads:

this->ptr = new pair<pos, Obj*>::pair(it->first, it->second);

Here, ptr is of type pair<pos, Obj*>* and pos is a struct. I’ve declared using std::pair;.

Any hints on what is wrong, and what to try?

  • 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-06-15T23:44:01+00:00Added an answer on June 15, 2026 at 11:44 pm

    try changing the line to read:

    this->ptr = new std::pair<pos, Obj*>(it->first, it->second);

    Also IMHO, lose the using directives and use fully qualified names. It is clean, precise, and doesn’t allow for naming collisions. If you must use them, don’t use them in header files, just in your implementation files.

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

Sidebar

Related Questions

I've just tried compiling an iOS project using the the LLVM 1.5 compiler (included
I have an AIR application that I'm compiling to mobile. There is an iOS
I just installed Titanium SDK (1.5.1) and all the Android SDKs. Also, I already
I am working on and ios project compiling with Apple LLVM 4.0 with optimizations.
I am developing a plugin for an iOS application. I am compiling it into
I've been having trouble compiling my own OpenCV iOS project. I started with a
I´m compiling and ios project using an opencv framework, so I´m interested to know
When compiling my wxWidget HelloWorld application, I am getting the following errors: Warning 1
I'm currently compiling a static library for iOS, let's call it libMySDK.a. I copy
my application builds fine when i run it and unit tests built fine as

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.