Projects > cpp > Issues > Bug #1812

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

A warning of getStringWithEllipsisJni function when compiling it with clang.

Bug #1812 [Closed]
dumganhar 2013-03-08 07:08 . Updated almost 4 years ago

Refers to https://github.com/cocos2d/cocos2d-x/issues/2116

Compile++ thumb  : cocos2dx_static <= Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp

cocos2d-2.0-x-2.0.4/cocos2dx/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp:25:17:
    warning: 'getStringWithEllipsisJni' has C-linkage specified,
        but returns user-defined type 'std::string' (aka 'basic_string')
        which is incompatible with C [-Wreturn-type-c-linkage]

std::string getStringWithEllipsisJni(const char* pszText, float width, float fontSize) {
            ^

1 warning generated.
dumganhar 2013-03-08 10:14
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:bc3c14cd543c8e67d6f3ab9f0364a5218ebb0e25.

Atom PDF

Status:Closed
Start date:2013-03-08
Priority:Normal
Due date:
Assignee:dumganhar
% Done:

100%

Category:android
Target version:cocos2d-2.1rc0-x-2.1.2

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.