Which setting in Project Settings page needs to be set in order for Xcode to generate debug symbols for a project?
If I set 'Generate Profiling Code" to checked, as soon as I try to build, I get the error,
cc1obj: error: unrecognised debug
output level "-full"
If not, the other way to do this I thought was by setting the 'OTHER_CFLAGS' value to '-g' but it also yields the same error.
Under your compiler's settings group ("i.e. GCC 4.2 - Code Generation") there's a setting called "Generate Debug Symbols".
You can get an overview of probably all debug-related settings just by typing "debug" in the search box.
Related
An "Errors exist in the active configuration of project X. Proceed with launch?" dialog appears while debugging code in Eclipse. Hitting the "Proceed" button results in successful debugging. There are no apparent errors with the launch configuration. A similar Run Configuration does not generate the error.
This is caused by an invalid path somewhere in your Eclipse project settings. There are a couple common sources for this kind of error.
You're working on a shared (version controlled, copied, etc) project where someone has hardcoded a path that doesn't exist on your machine, or uses an environment variable that you've not set.
Sometimes, you can find the offending path by looking at the full list of Error messages. If not, look in your project file.
The Discovery Options in your project properties has 'Automate discovery of paths and symbols' enabled - but the process is generating an error.
If you're using a version of Eclipse that warns you this option is deprecated, uncheck the option to disable it and fix any includes in 'Preprocessor Include Paths' instead. If not. . .try it anyway.
Depending on your path changes, restart Eclipse and try again.
It starts the executable that was built last before you broke the build. That executable will be older then your source files. The reason you were able to debug is because your line numbers did not change for the code you've debugged - e.g. you may try break in main then introduce a compilation error and move main a couple lines below - the debug will highlight the wrong lines when it stops.
I've changed something in my project settings and now when I run this project to build and debug I get build error:
GenerateDSYMFile error: tried to link DWARF for unsupported file: "correct path to my application executable here"
but! when I press RUN once more it works like a charm and my app starts in Simulator.
so I need press cmd-R twice every time to debug my app.
it was normal in previous version of my project so I don't know what changes I've made %)
all my other projects works fine and I can just recreate this project, but I want to figured it out - what trigger this error. I tried to ask this question on Apple devforums but without any success.
any help here? thx )
ps this error shows as Xcode3 as Xcode4
There is same file name as your project name in bundle so get rid of that file by renaming it and use accordingly.
Clean the project and run the project. Good to go.
not sure if you figured out what the problem was, had the same thing happen to me. I had made a text file called the same name as my project - when I got rid of that it fixed it.
Try changing under Build Options > Debug Information Format. See if that helps.
I got it when I tried to run my app in the simulator.
Xcode said ATTACHING TO PROCESS but hung.
So had to kill XCode and restart.
When I ran project again it built ok but when I said RUN it got that link error.
I fixed it by deleting the app in the Simulator and hit run again and it worked.
In my case It was a plist file causing the error.
I renamed the file and updated Info.plist File in Target Build Settings and that fixed it.
I got the same error: "error: tried to link DWARF for unsupported file: /Volumes/..."
This error wasn't shown before up until I changed to Xcode 6 in my Jenkins server. Before we had the same setting of the App and was building without any problem.
I was building the app as Realase version via Jenkins and I had the setting to build with the following configuration "-configuration Release" and the parameter "Debug Information Format" in Build Setting of the app was set to DWARF-with-dSYM.
In order to solve this error I changed in the targets in Xcode in Build Settings in the parameter "Debug Information Format" to DWARF only and I didn't get any error from Jenkins.
The apple developer documentation says this regarding the different values of this parameter:
DEBUG_INFORMATION_FORMAT (Debug Information Format)
Description: Identifier. Identifies the format used to store the binary’s debug information.
Values:
stabs: Use the Stabs format and place the debug information in the binary.
dwarf: Use the DWARF format and place the debug information in the binary.
dwarf-with-dsym: Use the DWARF format and place the debug information in a dSYM file.
Default value:
dwarf
Prerequisite for:
“GCC_ENABLE_SYMBOL_SEPARATION (Separate PCH Symbols).”
Link: https://developer.apple.com/library/mac/documentation/developertools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html
I installed the latest official iphone sdk and now my personal project is getting the same compiler error in UIView.h as described in this question:
Syntax error before '^' token
syntax error before '^' token
The solution is apparently to change compiler settings to use GCC 4.2 or LLVM.
I've tried using every compiler setting available in Xcode that but am still getting the errors.
Is there something else I should be doing to support the (^) block syntax in my project. The project was building fine with the previous official sdk release (pre OS4)
Another strange detail, I only get the error in debug config, not release.
I tried comparing the build settings between debug and release but didnt see any major differences. Where there were differences I tried setting the debug config to use the release config values but still getting those errors.
thanks in advance for any help
ok so I just found my problem.
I was changing build settings by right click -> Get Info on the project but I should have been doing it on the target (which was still using GCC 4.0 even though the project was set to 4.2)
Make sure you have the right configuration or configurations picked when you change compile settings. It's easy to overlook this, for example: picking the Release build when you meant the Debug, or vice versa; or by using other custom build configurations.
I'm trying to setup my Xcode project to be instrumented with gcov so I can determine the code coverage of my unit tests. All of the documentation I find online talks about settings that I don't find in Xcode 3.1, though. An example:
To work with Coverstory, first you need to set up your target to work with gcov. This requires turning on "Instrument Program Flow", "Generate Test Coverage Files" and linking with the gcov library.
(Using Coverstory)
The closest thing I can find to "Instrument Program Flow" and "Generate Test Coverage Files" in my build settings is "Generate Profiling Code", which doesn't appear to do what I want it to do.
Am I looking in the wrong place for these settings or are all of the examples I'm finding online stale?
Update: I've looked back at my notes when I first set this up - your "Base SDK" has to be the same as your current build target, otherwise the options you need won't appear:
http://iphonesdkdev.blogspot.com/2009/05/xcode-gcc-section-missing-in-build.html
FYI, my "Instrument Program Flow" and "Generate Test Coverage Files" options show up underneath heading "GCC 4.0 - Code Generation".
I remember similar problems with build settings being hidden - usually it is because of a dependency on another build setting, e.g. two from my project that I know matter are:
-C/C++ Compiler Version = GCC 4.0
-Base SDK = iPhone Simulator 2.1 (missing)
You may also want to check out the Google Toolbox For Mac Xcode Plugin which adds menu items for easily setting up code coverage:
http://code.google.com/p/google-toolbox-for-mac/wiki/GTMXcodePlugin
In my Xcode project, I'm looking at the "Target Info" window, "Build" tab. In the list of compiler settings, for most of my configurations ("Release", "Distribution", and "Ad Hoc"), there's a settings section called "GCC 4.2 - Preprocessing". When I switch to my "Debug" configuration, that section goes away.
What can I do to make my "Debug" configuration show these settings as well?
Thanks.
Is your Debug configuration's Base SDK set to a missing SDK? Xcode gets the specs for what flags the compiler supports from the configured base SDK. If it's missing, then Xcode doesn't know what compiler to show flags for.
Your Debug configuration might build correctly if you're using the Overview popup to set an override SDK. But since that's an override setting, the build setting inspector doesn't know about it. You have to set the base SDK to something valid, even if you're overriding it with the Active SDK popup.