Linker problem using Objective-C++ with Objective-C
Currently I have an iOS project which is using Objective-C. For performance reasons I have implemented Objective-C++ code which looks like the following:
base11.mm
#include <string>
#include "base11.h"
static const std::string characters = "0123456789_";
const char* to_base11(long n)
// some c++ code here
long from_base11(const char* input)
// some c++ code here
base11.h
#ifndef base11_h
#define base11_h
#include <stdio.h>
const char* to_base11(long n);
long from_base11(const char* input);
#endif /* base11_h */
Of course, I used the .mm extension for the class, and I am only using plain C function parameters and return types.
Then I have an Objective-C class which wraps these C++ functions in the following methods:
Util.m
#include "base11.h"
+(NSString*) convertBase10ToBase11:(long) base10
const char* base11 = to_base11(base10);
return [NSString stringWithUTF8String:base11];
+(NSNumber*) convertBase11ToBase10:(NSString*) base11
const char* input = [base11 UTF8String];
return @(from_base11(input));
And the Util.h:
@interface Util : NSObject
+(NSString*) convertBase10ToBase11:(long) base10;
+(NSNumber*) convertBase11ToBase10:(NSString*) base11;
@end
However this gives the following compilation error:
Undefined symbols for architecture x86_64:
"_from_base11", referenced from:
+[Util convertBase11ToBase10:] in Util.o
"_to_base11", referenced from:
+[Util convertBase10ToBase11:] in Util.o
ld: symbol(s) not found for architecture x86_64
However, this is very weird. I have chosen to NOT use the .mm extension for the Util.m class since I don't use any C++ code there. Also note that the base11.h header file is not using any C++ code as well. So, why do I get this error? According to this post my approach should be correct:
How to call a method on .mm file from a objective c class
c++ ios objective-c objective-c++
add a comment |
Currently I have an iOS project which is using Objective-C. For performance reasons I have implemented Objective-C++ code which looks like the following:
base11.mm
#include <string>
#include "base11.h"
static const std::string characters = "0123456789_";
const char* to_base11(long n)
// some c++ code here
long from_base11(const char* input)
// some c++ code here
base11.h
#ifndef base11_h
#define base11_h
#include <stdio.h>
const char* to_base11(long n);
long from_base11(const char* input);
#endif /* base11_h */
Of course, I used the .mm extension for the class, and I am only using plain C function parameters and return types.
Then I have an Objective-C class which wraps these C++ functions in the following methods:
Util.m
#include "base11.h"
+(NSString*) convertBase10ToBase11:(long) base10
const char* base11 = to_base11(base10);
return [NSString stringWithUTF8String:base11];
+(NSNumber*) convertBase11ToBase10:(NSString*) base11
const char* input = [base11 UTF8String];
return @(from_base11(input));
And the Util.h:
@interface Util : NSObject
+(NSString*) convertBase10ToBase11:(long) base10;
+(NSNumber*) convertBase11ToBase10:(NSString*) base11;
@end
However this gives the following compilation error:
Undefined symbols for architecture x86_64:
"_from_base11", referenced from:
+[Util convertBase11ToBase10:] in Util.o
"_to_base11", referenced from:
+[Util convertBase10ToBase11:] in Util.o
ld: symbol(s) not found for architecture x86_64
However, this is very weird. I have chosen to NOT use the .mm extension for the Util.m class since I don't use any C++ code there. Also note that the base11.h header file is not using any C++ code as well. So, why do I get this error? According to this post my approach should be correct:
How to call a method on .mm file from a objective c class
c++ ios objective-c objective-c++
AddCF_EXTERNbefore to_base11 and from_base11 prototypes.
– Cy-4AH
Nov 12 at 8:46
@Cy-4AH after adding these in the header file, the same error persists.
– Giovanni Terlingen
Nov 12 at 8:58
Note that the C standard library contains (usually fast) base 11 string reading functions instrtol/strtoul:strtoul(string, NULL, 11). (This assumes that "A" = decimal 10)
– pmdj
Nov 12 at 11:56
@pmdj yes, thank you. However in our implementation we have replaced theAwith_
– Giovanni Terlingen
Nov 12 at 11:58
add a comment |
Currently I have an iOS project which is using Objective-C. For performance reasons I have implemented Objective-C++ code which looks like the following:
base11.mm
#include <string>
#include "base11.h"
static const std::string characters = "0123456789_";
const char* to_base11(long n)
// some c++ code here
long from_base11(const char* input)
// some c++ code here
base11.h
#ifndef base11_h
#define base11_h
#include <stdio.h>
const char* to_base11(long n);
long from_base11(const char* input);
#endif /* base11_h */
Of course, I used the .mm extension for the class, and I am only using plain C function parameters and return types.
Then I have an Objective-C class which wraps these C++ functions in the following methods:
Util.m
#include "base11.h"
+(NSString*) convertBase10ToBase11:(long) base10
const char* base11 = to_base11(base10);
return [NSString stringWithUTF8String:base11];
+(NSNumber*) convertBase11ToBase10:(NSString*) base11
const char* input = [base11 UTF8String];
return @(from_base11(input));
And the Util.h:
@interface Util : NSObject
+(NSString*) convertBase10ToBase11:(long) base10;
+(NSNumber*) convertBase11ToBase10:(NSString*) base11;
@end
However this gives the following compilation error:
Undefined symbols for architecture x86_64:
"_from_base11", referenced from:
+[Util convertBase11ToBase10:] in Util.o
"_to_base11", referenced from:
+[Util convertBase10ToBase11:] in Util.o
ld: symbol(s) not found for architecture x86_64
However, this is very weird. I have chosen to NOT use the .mm extension for the Util.m class since I don't use any C++ code there. Also note that the base11.h header file is not using any C++ code as well. So, why do I get this error? According to this post my approach should be correct:
How to call a method on .mm file from a objective c class
c++ ios objective-c objective-c++
Currently I have an iOS project which is using Objective-C. For performance reasons I have implemented Objective-C++ code which looks like the following:
base11.mm
#include <string>
#include "base11.h"
static const std::string characters = "0123456789_";
const char* to_base11(long n)
// some c++ code here
long from_base11(const char* input)
// some c++ code here
base11.h
#ifndef base11_h
#define base11_h
#include <stdio.h>
const char* to_base11(long n);
long from_base11(const char* input);
#endif /* base11_h */
Of course, I used the .mm extension for the class, and I am only using plain C function parameters and return types.
Then I have an Objective-C class which wraps these C++ functions in the following methods:
Util.m
#include "base11.h"
+(NSString*) convertBase10ToBase11:(long) base10
const char* base11 = to_base11(base10);
return [NSString stringWithUTF8String:base11];
+(NSNumber*) convertBase11ToBase10:(NSString*) base11
const char* input = [base11 UTF8String];
return @(from_base11(input));
And the Util.h:
@interface Util : NSObject
+(NSString*) convertBase10ToBase11:(long) base10;
+(NSNumber*) convertBase11ToBase10:(NSString*) base11;
@end
However this gives the following compilation error:
Undefined symbols for architecture x86_64:
"_from_base11", referenced from:
+[Util convertBase11ToBase10:] in Util.o
"_to_base11", referenced from:
+[Util convertBase10ToBase11:] in Util.o
ld: symbol(s) not found for architecture x86_64
However, this is very weird. I have chosen to NOT use the .mm extension for the Util.m class since I don't use any C++ code there. Also note that the base11.h header file is not using any C++ code as well. So, why do I get this error? According to this post my approach should be correct:
How to call a method on .mm file from a objective c class
c++ ios objective-c objective-c++
c++ ios objective-c objective-c++
asked Nov 12 at 8:31
Giovanni Terlingen
2,7431928
2,7431928
AddCF_EXTERNbefore to_base11 and from_base11 prototypes.
– Cy-4AH
Nov 12 at 8:46
@Cy-4AH after adding these in the header file, the same error persists.
– Giovanni Terlingen
Nov 12 at 8:58
Note that the C standard library contains (usually fast) base 11 string reading functions instrtol/strtoul:strtoul(string, NULL, 11). (This assumes that "A" = decimal 10)
– pmdj
Nov 12 at 11:56
@pmdj yes, thank you. However in our implementation we have replaced theAwith_
– Giovanni Terlingen
Nov 12 at 11:58
add a comment |
AddCF_EXTERNbefore to_base11 and from_base11 prototypes.
– Cy-4AH
Nov 12 at 8:46
@Cy-4AH after adding these in the header file, the same error persists.
– Giovanni Terlingen
Nov 12 at 8:58
Note that the C standard library contains (usually fast) base 11 string reading functions instrtol/strtoul:strtoul(string, NULL, 11). (This assumes that "A" = decimal 10)
– pmdj
Nov 12 at 11:56
@pmdj yes, thank you. However in our implementation we have replaced theAwith_
– Giovanni Terlingen
Nov 12 at 11:58
Add
CF_EXTERN before to_base11 and from_base11 prototypes.– Cy-4AH
Nov 12 at 8:46
Add
CF_EXTERN before to_base11 and from_base11 prototypes.– Cy-4AH
Nov 12 at 8:46
@Cy-4AH after adding these in the header file, the same error persists.
– Giovanni Terlingen
Nov 12 at 8:58
@Cy-4AH after adding these in the header file, the same error persists.
– Giovanni Terlingen
Nov 12 at 8:58
Note that the C standard library contains (usually fast) base 11 string reading functions in
strtol/strtoul: strtoul(string, NULL, 11). (This assumes that "A" = decimal 10)– pmdj
Nov 12 at 11:56
Note that the C standard library contains (usually fast) base 11 string reading functions in
strtol/strtoul: strtoul(string, NULL, 11). (This assumes that "A" = decimal 10)– pmdj
Nov 12 at 11:56
@pmdj yes, thank you. However in our implementation we have replaced the
A with _– Giovanni Terlingen
Nov 12 at 11:58
@pmdj yes, thank you. However in our implementation we have replaced the
A with _– Giovanni Terlingen
Nov 12 at 11:58
add a comment |
1 Answer
1
active
oldest
votes
This is problem in function's symbol name.
C++ allows functions with same name and different prototype.
So when functions compiled with C++/Objective-C++ it got symbol name that describes it prototype and makes it unique.
So you need to force compiler use C's symbol name.
You can achieve that by adding extern "C" before function prototype.
But it's not very convenient if you use this header in both C and C++ source files, because C doesn't know what it is extern "C".
Luckily CoreFoundation already have solved this issue. You can peep how they declared their CFString.h, CFArray.h.
So you just need use CoreFoundation's macro: CF_EXTERN_C_BEGIN and CF_EXTERN_C_END.
#ifndef base11_h
#define base11_h
#include <stdio.h>
#include <CoreFoundation/CFBase.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_EXTERN_C_BEGIN
const char* to_base11(long n);
long from_base11(const char* input);
CF_EXTERN_C_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* base11_h */
Unfortenately, the same error persists. Thanks anyway.
– Giovanni Terlingen
Nov 12 at 9:44
1
This should fix the problem, are you sure the .mm file is being linked into your project? Find the Object file (.o) corresponding to your .mm file and check what symbols it exports using thenmcommand:nm path/to/base11.o; the path will be something like/Users/USERNAME/Library/Developer/Xcode/DerivedData/PROJECTNAME-RANDOMSTRING/Build/Intermediates/PROJECTNAME.build/Debug/TARGETNAME.build/Objects-normal/x86_64/base11.oCheck that_from_base11and_to_base11are listed asT.
– pmdj
Nov 12 at 11:55
2
@GiovanniTerlingen If they're there, you're not linking against the file. If they're missing, you've got the extern "C" part wrong. To avoid pulling in CoreFoundation (or to rule out issues with your use of those macros), you can just wrap the declarations in#ifdef __cplusplusextern "C"#endif…#ifdef __cplusplus#endif
– pmdj
Nov 12 at 12:11
Your answer, in combination with adding the file to the build variant (it was not added -.-) worked! Thanks a lot and have a nice day.
– Giovanni Terlingen
Nov 12 at 13:04
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53258343%2flinker-problem-using-objective-c-with-objective-c%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is problem in function's symbol name.
C++ allows functions with same name and different prototype.
So when functions compiled with C++/Objective-C++ it got symbol name that describes it prototype and makes it unique.
So you need to force compiler use C's symbol name.
You can achieve that by adding extern "C" before function prototype.
But it's not very convenient if you use this header in both C and C++ source files, because C doesn't know what it is extern "C".
Luckily CoreFoundation already have solved this issue. You can peep how they declared their CFString.h, CFArray.h.
So you just need use CoreFoundation's macro: CF_EXTERN_C_BEGIN and CF_EXTERN_C_END.
#ifndef base11_h
#define base11_h
#include <stdio.h>
#include <CoreFoundation/CFBase.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_EXTERN_C_BEGIN
const char* to_base11(long n);
long from_base11(const char* input);
CF_EXTERN_C_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* base11_h */
Unfortenately, the same error persists. Thanks anyway.
– Giovanni Terlingen
Nov 12 at 9:44
1
This should fix the problem, are you sure the .mm file is being linked into your project? Find the Object file (.o) corresponding to your .mm file and check what symbols it exports using thenmcommand:nm path/to/base11.o; the path will be something like/Users/USERNAME/Library/Developer/Xcode/DerivedData/PROJECTNAME-RANDOMSTRING/Build/Intermediates/PROJECTNAME.build/Debug/TARGETNAME.build/Objects-normal/x86_64/base11.oCheck that_from_base11and_to_base11are listed asT.
– pmdj
Nov 12 at 11:55
2
@GiovanniTerlingen If they're there, you're not linking against the file. If they're missing, you've got the extern "C" part wrong. To avoid pulling in CoreFoundation (or to rule out issues with your use of those macros), you can just wrap the declarations in#ifdef __cplusplusextern "C"#endif…#ifdef __cplusplus#endif
– pmdj
Nov 12 at 12:11
Your answer, in combination with adding the file to the build variant (it was not added -.-) worked! Thanks a lot and have a nice day.
– Giovanni Terlingen
Nov 12 at 13:04
add a comment |
This is problem in function's symbol name.
C++ allows functions with same name and different prototype.
So when functions compiled with C++/Objective-C++ it got symbol name that describes it prototype and makes it unique.
So you need to force compiler use C's symbol name.
You can achieve that by adding extern "C" before function prototype.
But it's not very convenient if you use this header in both C and C++ source files, because C doesn't know what it is extern "C".
Luckily CoreFoundation already have solved this issue. You can peep how they declared their CFString.h, CFArray.h.
So you just need use CoreFoundation's macro: CF_EXTERN_C_BEGIN and CF_EXTERN_C_END.
#ifndef base11_h
#define base11_h
#include <stdio.h>
#include <CoreFoundation/CFBase.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_EXTERN_C_BEGIN
const char* to_base11(long n);
long from_base11(const char* input);
CF_EXTERN_C_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* base11_h */
Unfortenately, the same error persists. Thanks anyway.
– Giovanni Terlingen
Nov 12 at 9:44
1
This should fix the problem, are you sure the .mm file is being linked into your project? Find the Object file (.o) corresponding to your .mm file and check what symbols it exports using thenmcommand:nm path/to/base11.o; the path will be something like/Users/USERNAME/Library/Developer/Xcode/DerivedData/PROJECTNAME-RANDOMSTRING/Build/Intermediates/PROJECTNAME.build/Debug/TARGETNAME.build/Objects-normal/x86_64/base11.oCheck that_from_base11and_to_base11are listed asT.
– pmdj
Nov 12 at 11:55
2
@GiovanniTerlingen If they're there, you're not linking against the file. If they're missing, you've got the extern "C" part wrong. To avoid pulling in CoreFoundation (or to rule out issues with your use of those macros), you can just wrap the declarations in#ifdef __cplusplusextern "C"#endif…#ifdef __cplusplus#endif
– pmdj
Nov 12 at 12:11
Your answer, in combination with adding the file to the build variant (it was not added -.-) worked! Thanks a lot and have a nice day.
– Giovanni Terlingen
Nov 12 at 13:04
add a comment |
This is problem in function's symbol name.
C++ allows functions with same name and different prototype.
So when functions compiled with C++/Objective-C++ it got symbol name that describes it prototype and makes it unique.
So you need to force compiler use C's symbol name.
You can achieve that by adding extern "C" before function prototype.
But it's not very convenient if you use this header in both C and C++ source files, because C doesn't know what it is extern "C".
Luckily CoreFoundation already have solved this issue. You can peep how they declared their CFString.h, CFArray.h.
So you just need use CoreFoundation's macro: CF_EXTERN_C_BEGIN and CF_EXTERN_C_END.
#ifndef base11_h
#define base11_h
#include <stdio.h>
#include <CoreFoundation/CFBase.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_EXTERN_C_BEGIN
const char* to_base11(long n);
long from_base11(const char* input);
CF_EXTERN_C_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* base11_h */
This is problem in function's symbol name.
C++ allows functions with same name and different prototype.
So when functions compiled with C++/Objective-C++ it got symbol name that describes it prototype and makes it unique.
So you need to force compiler use C's symbol name.
You can achieve that by adding extern "C" before function prototype.
But it's not very convenient if you use this header in both C and C++ source files, because C doesn't know what it is extern "C".
Luckily CoreFoundation already have solved this issue. You can peep how they declared their CFString.h, CFArray.h.
So you just need use CoreFoundation's macro: CF_EXTERN_C_BEGIN and CF_EXTERN_C_END.
#ifndef base11_h
#define base11_h
#include <stdio.h>
#include <CoreFoundation/CFBase.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_EXTERN_C_BEGIN
const char* to_base11(long n);
long from_base11(const char* input);
CF_EXTERN_C_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* base11_h */
answered Nov 12 at 9:35
Cy-4AH
3,6772818
3,6772818
Unfortenately, the same error persists. Thanks anyway.
– Giovanni Terlingen
Nov 12 at 9:44
1
This should fix the problem, are you sure the .mm file is being linked into your project? Find the Object file (.o) corresponding to your .mm file and check what symbols it exports using thenmcommand:nm path/to/base11.o; the path will be something like/Users/USERNAME/Library/Developer/Xcode/DerivedData/PROJECTNAME-RANDOMSTRING/Build/Intermediates/PROJECTNAME.build/Debug/TARGETNAME.build/Objects-normal/x86_64/base11.oCheck that_from_base11and_to_base11are listed asT.
– pmdj
Nov 12 at 11:55
2
@GiovanniTerlingen If they're there, you're not linking against the file. If they're missing, you've got the extern "C" part wrong. To avoid pulling in CoreFoundation (or to rule out issues with your use of those macros), you can just wrap the declarations in#ifdef __cplusplusextern "C"#endif…#ifdef __cplusplus#endif
– pmdj
Nov 12 at 12:11
Your answer, in combination with adding the file to the build variant (it was not added -.-) worked! Thanks a lot and have a nice day.
– Giovanni Terlingen
Nov 12 at 13:04
add a comment |
Unfortenately, the same error persists. Thanks anyway.
– Giovanni Terlingen
Nov 12 at 9:44
1
This should fix the problem, are you sure the .mm file is being linked into your project? Find the Object file (.o) corresponding to your .mm file and check what symbols it exports using thenmcommand:nm path/to/base11.o; the path will be something like/Users/USERNAME/Library/Developer/Xcode/DerivedData/PROJECTNAME-RANDOMSTRING/Build/Intermediates/PROJECTNAME.build/Debug/TARGETNAME.build/Objects-normal/x86_64/base11.oCheck that_from_base11and_to_base11are listed asT.
– pmdj
Nov 12 at 11:55
2
@GiovanniTerlingen If they're there, you're not linking against the file. If they're missing, you've got the extern "C" part wrong. To avoid pulling in CoreFoundation (or to rule out issues with your use of those macros), you can just wrap the declarations in#ifdef __cplusplusextern "C"#endif…#ifdef __cplusplus#endif
– pmdj
Nov 12 at 12:11
Your answer, in combination with adding the file to the build variant (it was not added -.-) worked! Thanks a lot and have a nice day.
– Giovanni Terlingen
Nov 12 at 13:04
Unfortenately, the same error persists. Thanks anyway.
– Giovanni Terlingen
Nov 12 at 9:44
Unfortenately, the same error persists. Thanks anyway.
– Giovanni Terlingen
Nov 12 at 9:44
1
1
This should fix the problem, are you sure the .mm file is being linked into your project? Find the Object file (.o) corresponding to your .mm file and check what symbols it exports using the
nm command: nm path/to/base11.o; the path will be something like /Users/USERNAME/Library/Developer/Xcode/DerivedData/PROJECTNAME-RANDOMSTRING/Build/Intermediates/PROJECTNAME.build/Debug/TARGETNAME.build/Objects-normal/x86_64/base11.o Check that _from_base11 and _to_base11 are listed as T.– pmdj
Nov 12 at 11:55
This should fix the problem, are you sure the .mm file is being linked into your project? Find the Object file (.o) corresponding to your .mm file and check what symbols it exports using the
nm command: nm path/to/base11.o; the path will be something like /Users/USERNAME/Library/Developer/Xcode/DerivedData/PROJECTNAME-RANDOMSTRING/Build/Intermediates/PROJECTNAME.build/Debug/TARGETNAME.build/Objects-normal/x86_64/base11.o Check that _from_base11 and _to_base11 are listed as T.– pmdj
Nov 12 at 11:55
2
2
@GiovanniTerlingen If they're there, you're not linking against the file. If they're missing, you've got the extern "C" part wrong. To avoid pulling in CoreFoundation (or to rule out issues with your use of those macros), you can just wrap the declarations in
#ifdef __cplusplus extern "C" #endif … #ifdef __cplusplus #endif– pmdj
Nov 12 at 12:11
@GiovanniTerlingen If they're there, you're not linking against the file. If they're missing, you've got the extern "C" part wrong. To avoid pulling in CoreFoundation (or to rule out issues with your use of those macros), you can just wrap the declarations in
#ifdef __cplusplus extern "C" #endif … #ifdef __cplusplus #endif– pmdj
Nov 12 at 12:11
Your answer, in combination with adding the file to the build variant (it was not added -.-) worked! Thanks a lot and have a nice day.
– Giovanni Terlingen
Nov 12 at 13:04
Your answer, in combination with adding the file to the build variant (it was not added -.-) worked! Thanks a lot and have a nice day.
– Giovanni Terlingen
Nov 12 at 13:04
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53258343%2flinker-problem-using-objective-c-with-objective-c%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Add
CF_EXTERNbefore to_base11 and from_base11 prototypes.– Cy-4AH
Nov 12 at 8:46
@Cy-4AH after adding these in the header file, the same error persists.
– Giovanni Terlingen
Nov 12 at 8:58
Note that the C standard library contains (usually fast) base 11 string reading functions in
strtol/strtoul:strtoul(string, NULL, 11). (This assumes that "A" = decimal 10)– pmdj
Nov 12 at 11:56
@pmdj yes, thank you. However in our implementation we have replaced the
Awith_– Giovanni Terlingen
Nov 12 at 11:58