Very, very new at Obj-C... that said, I had some problems with code earlier, which seem to be resolved (I guess!). Now, when I do a build, I get this:
I am not using vanilla SQLite, but rather SQLCipher, (http://sqlcipher.net)
What symbols is it talking about? and how do I fix it?
Thank you (in advance) for looking at this... I'm "dead in the water" until I can get this fixed!
It looks like you haven't added the SQLite library to your project. Choose Project->Add to Project... and select the library.
When Xcode says 'symbols not found,' it's telling you that you're using a name for something that's not defined anywhere. The specific symbol it shows you is _sqlite3_open, which looks like the sort of thing that would be defined by the SQLite library.
Related
Update: Known IDEA issue: https://youtrack.jetbrains.com/issue/KTIJ-10228. Thanks #somethingsomething for the pointer.
I'm learning Kotlin and in one of the examples, there's the following code:
listOf("carrot", "cheese", "chocolate")
Putting it in IDEA and following up listOf source (control/command + click) leads to:
Which is very nice. I can see actual source code and learn from the origin. But!!!
When further clicking on asList leads to:
But here, there's no source code. Dead end :(
The expect keyword means that the actual implementation is platform dependent.
Is there a way to look up the code, connecting it to IDEA? For example, if I'm on a Mac, how do I see the local implementation and connect it to IDEA using control/command + click? Thanks.
I've searched for similar questions in SO. Found some related to dependency definitions in pom to see the source code instead of decompiled code. My problem is different. I actually see the source code - not any decompiled code. My specific problem is that not all source code is shown. Specifically missing the platform dependent source code.
IDEA version:
IntelliJ IDEA 2022.1.1 (Ultimate Edition)
Build #IU-221.5591.52, built on May 10, 2022
I was working with a custom iOS framework project in Xcode.There I am getting a lot of errors mentioning "Reference to ' ' is ambigous".I am attaching the screenshot of errors.Please help me correcting this.
Adding more information to Jason's answer.
The error message makes me think you have two declarations of the same library functions. All of those references are from UIKit
mostly this can be occurring because of the header files. As you can see all the errors indicates that it is quoting the enum values. Enum values will always be in the .h files. Normally the reference headers(.h files) will be present inside the frameworks. It is a common mistake that sometimes these header files will be buried some where in our code by any third party frameworks. So kindly check your third party libraries.
I did face this issue once and after searching everywhere i could not able to find the solution. The only thing solved my issue was
Opening a fresh project and importing my files into that project. Actually it really took me less than 10 minutes to move to a new project and immediately my xcode was happy. This is definitely worth a try.
Actually This error was cleared when I shift from iOS SDK 6.1 to 7.1(or any version higher that 6.1)
The error message makes me think you have two declarations of the same library functions. All of those references are from UIKit. Check to make sure only one version of UIKit is referenced in your project (check the frameworks), and make sure any libraries you have included are linking the same UIKit version as the rest of the app.
Steps to fix from here:
Clean the project
Delete everything inside
'~/Library/Developer/Xcode/DerivedData/ModuleCache/' (the button
inside the organizer window did not work for me)
Clean once more
Build project
from here: Reference to 'X' is ambiguous
Clean your project and rebuild again.If it don't work then create a new project
Set value of Enable Module (C and objective-c) to No
Is there a way how to check source code files (Objective C) and show warning for methods/functions that are longer than x lines (where the x can be configured). Something that can be integrated in Xcode would be great.
I have looked into these two following static analyzers for C/C++/ObjC code if they provide such functionality but I couldn't find anything mentioned in the documentation:
http://clang-analyzer.llvm.org
http://oclint.org (longMethod rule)
Any ideas where to look further?
Hmmm, looks like you could write an Xcode plugin to do that, sounds like it could be useful! I'll admit to not having done one before but I did find this link as a starting point.
I am currently working on a program, that uses images and need to add the module mentioned in this question
(require 2htdp/image)
I come up the the error
I see a require of the module 2htdp/image,
but I don't yet know what this module is.
How do I solve this? I have no idea how to make WeScheme know what a module is. Thanks in advance.
2htdp/image is part of the How to Design Programs teachpacks that come with Racket, if you need it you should use Racket as your Scheme interpreter.
From the error message, it looks like you meant to write 2htdp/image, but you wrote htdp2/image instead. Note the different location of the 2.
I know this is pretty much a stupid question. I know almost nothing about how compiler really works.
But recently I want find what symbol name does the compiler generate for my ivar, my methods.
Where and how can I know the answer? (I have only used some IDEs. So if the solution is better to be simple . And it would be great help if the instructions you provide is really explicit)
(By the way,is there any reference that i can learn about the things like this?)
PS.I'm IOS developer.And if gcc and LLVM works different answer on this question , I would like to know both.
You can use nm to dump the content of a binary object. Then, each compiler has its own way of mangling. I suggest you have a look at Name mangling for objective C in wikipedia, it will help you understand how mangling works.
Surely GCC and Clang must have compatible name-mangling schemes, since they can use each other's code.
If you are using XCode 3 select a source file and then pick "Show Assembly Code" from the Build menu.
Apparently XCode 4 users do not need assembly code :-(