Linking with Xcode!

Hi
I'm very frustrated with Xcode here. I came from windows and try to do some development for mac and i have to say documentation is hopeless.
I'm just wasting my time figuring out the simplest things.
e.g my codebase needs pnglib - I could build pnglib it, but I can't get my app to use it.
I have it installed in usr/local..
Under Visual studio in windows i find it quite straight forward how to add librarys and paths.
Under Xcode I can't even figure out how to add a simple lib to link with my executable. Where are is this done???
Also where can I edit the final command line arguments for the compiler?
So basically I - as a long software developer for windows (also qnx, but just command line tools) - have bloody no chance to get the simplest thing done with macOs Xcode. (I don't wanna go back to windows, but i'm very tired wasting time here, without getting anything done effectivly)
Also has somebody around here any idea how to get frameworks and more improtantly NIB files to work with cmake tool???
I'm thankfull for any help! Must be very simple anyway? just wanna tell my project to link with a lib in /usr/local ... ???
cheers

thanks, i'll try that!!!
i build libpng myself sucessfully but could get that linked in any app i tried to use it (there i was able to 'drag' the lib into my frameworks), but always had an eror with some platform traget thing that didn't match. (so it didn;t consider this in the linkinf and then ended up with all png stuff un unresolved symbols)
anyway so i used a prebuild of pnglib wich i found, this installs by default in usr/.. which is ok for now, as i just want the bloody thing to link, so i can develop further.
When i get so far that i want to give this to somebody else. Would want to put the lib in the dmg package (which I also haven't figured out how to do that, who to include there, when i press build, and then also link to it .... so if u want to tell me, i will listen ... !!!, then i might also try that !!!)
thank you
cheers

Similar Messages

  • How to Use Custom Linker with Xcode 4.x?

    I am using a customer compiler with Xcode and would like to know how to force Xcode to use my own linker line with custom arguments.
    I created a new compiler spec file under:
    /Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/SharedSupp ort/Developer/Library/Xcode/Plug-ins
    The default linker is defined in Ld.spec located in:
    /Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/SharedSupp ort/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources
    The following link seems to indicate that what I want to do is possible:
    http://maxao.free.fr/xcode-plugin-interface/compilers-linkers.html
    It seems like you have to create a custom Linker spec, give it an identifier, and then have the compiler spec reference your linker spec id by including it in the "RequiredLinker" key.
    My compiler spec looks like:
    {   Type = Compiler;
       Identifier = com.apple.compilers.armx;
       BasedOn = com.apple.compilers.gcc.4_2;
       Name = "ARMx";
       Version = "4.2";
       Description = "ARMx GCC Cross Compiler";
       ExecPath = "/Volumes/arm-x/bin/arm-none-linux-gnueabi-gcc";
       RequiredLinker = com.apple.pbx.linkers.armx;
    The problem is that Xcode 4.1 still is insisting on using the default Apple linker.  I want it to use my ARM based toolchain, which does not support some of the options that Xcode ends up passing on the linker line.

    You would be better off using a makefile-based project with custom compilers and linkers.

  • XCode 3 and iOS 4.3 download link with error

    Hi,
    I'm trying to download the lastest version of iOS SDK with XCode 3, with this link: https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundl eID=20792 , but the link returns the error:
    We apologize.
    We are experiencing technical difficulties. Please try again later.
    If you would like to return to the Developer Downloads & ADC Program Assets site, please log in.
    Someone knows other source to download the SDK?
    Thanks

    I don't know...
    I'm just logging in the iOS Developer Center (https://developer.apple.com/devcenter/ios/index.action) and clicking in the link: Looking for Xcode 3? Download
    How can i know which servers i'm hiting?
    Thanks

  • Issues with XCode

    I was typing this in XCode (I had just gotten to the end) when this error comes up. A similar error also appears when I try to backspace over a double-slash comment if the comment is the first line.
    What does the error mean and why is it coming up?
    BTW I didn't realize the image links would cause the image to display; if they aren't, here are the links:
    /___sbsstatic___/migration-images/105/10575740-1.png for the first one and
    /___sbsstatic___/migration-images/105/10575740-2.png for the second one.
    Message was edited by: musicwind95

    I tried, and it did not help. Notice that I had typed the for(), pressed return, and tried to indent the code by pressing tab twice. I pressed them, XCode lagged, and then displayed the error. I cleared the caches before, and it didn't help. This issue has been present in Leopard as well as Snow Leopard, with XCode 3.1 and 3.2.

  • Build DNG SDK on Mac with XCode 6.2

    Hello everyone,
    I am trying to build the DNG_SDK Version 1.4 with XCode 6.2. I have downloaded all the third party libraries for xmp and dng sdk. After linking errors with the current xmp sdk 201412, I tried to compile DNG_SDK with XMP SDK Version CS6. The XMP Subproject is found in my DNG_SDK and is build successfully.
    For the DNG SDK I still get linker errors and I have no clue why (regardless which architecture I select i386 or x64):
    Ld /Users/sboegel/Downloads/dng_sdk_1_4/dng_sdk/targets/mac/release/dng_validate normal i386
        cd /Users/sboegel/Downloads/dng_sdk_1_4/dng_sdk/projects/mac
        export MACOSX_DEPLOYMENT_TARGET=10.9
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cl ang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOS X10.9.sdk -L/Users/sboegel/Downloads/dng_sdk_1_4/dng_sdk/targets/mac/release -F/Users/sboegel/Downloads/dng_sdk_1_4/dng_sdk/targets/mac/release -filelist /Users/sboegel/Library/Developer/Xcode/DerivedData/dng_validate-fjjibtptniqsozaqnhhmkybxy udz/Build/Intermediates/dng_validate.build/Default/dng_validate\ release.build/Objects-normal/i386/dng_validate.LinkFileList -mmacosx-version-min=10.9 /Users/sboegel/Library/Developer/Xcode/DerivedData/dng_validate-fjjibtptniqsozaqnhhmkybxy udz/Build/Products/libXMPFilesStatic.a /Users/sboegel/Library/Developer/Xcode/DerivedData/dng_validate-fjjibtptniqsozaqnhhmkybxy udz/Build/Products/libXMPCoreStatic.a -framework Carbon -Xlinker -dependency_info -Xlinker /Users/sboegel/Library/Developer/Xcode/DerivedData/dng_validate-fjjibtptniqsozaqnhhmkybxy udz/Build/Intermediates/dng_validate.build/Default/dng_validate\ release.build/Objects-normal/i386/dng_validate_dependency_info.dat -o /Users/sboegel/Downloads/dng_sdk_1_4/dng_sdk/targets/mac/release/dng_validate
    Undefined symbols for architecture i386:
      "TXMPMeta<std::string>::Initialize()", referenced from:
          XMPFiles::Initialize(unsigned int, char const*, char const*) in libXMPFilesStatic.a(XMPFiles.o)
      "TXMPMeta<std::string>::SetProperty(char const*, char const*, std::string const&, unsigned int)", referenced from:
          P2_MetaHandler::SetAudioInfoFromLegacyXML(bool) in libXMPFilesStatic.a(P2_Handler.o)
          P2_MetaHandler::SetVideoFrameInfoFromLegacyXML(XML_Node*, bool) in libXMPFilesStatic.a(P2_Handler.o)
          MP3_MetaHandler::ProcessXMP() in libXMPFilesStatic.a(MP3_Handler.o)
          ReadIDXFile(std::string const&, std::string const&, TXMPMeta<std::string>*, bool&, MD5_CTX*, bool) in libXMPFilesStatic.a(SonyHDV_Handler.o)
          XDCAMEX_MetaHandler::ProcessXMP() in libXMPFilesStatic.a(XDCAMEX_Handler.o)
          XDCAM_Support::GetLegacyMetadata(TXMPMeta<std::string>*, XML_Node*, char const*, bool, std::string&) in libXMPFilesStatic.a(XDCAM_Support.o)
          RIFF::importProperties(RIFF_MetaHandler*) in libXMPFilesStatic.a(RIFF_Support.o)
      "TXMPMeta<std::string>::SetProperty(char const*, char const*, char const*, unsigned int)", referenced from:
          ID3_Support::ID3v1Tag::read(XMP_IO*, TXMPMeta<std::string>*) in libXMPFilesStatic.a(ID3_Support.o)
          P2_MetaHandler::SetXMPPropertyFromLegacyXML(bool, XML_Node*, char const*, char const*, char const*, bool) in libXMPFilesStatic.a(P2_Handler.o)
          P2_MetaHandler::SetGPSPropertyFromLegacyXML(XML_Node*, bool, char const*, char const*) in libXMPFilesStatic.a(P2_Handler.o)
          P2_MetaHandler::SetAltitudeFromLegacyXML(XML_Node*, bool) in libXMPFilesStatic.a(P2_Handler.o)
          MP3_MetaHandler::ProcessXMP() in libXMPFilesStatic.a(MP3_Handler.o)
          MPEG4_MetaHandler::ProcessXMP() in libXMPFilesStatic.a(MPEG4_Handler.o)
          ReadIDXFile(std::string const&, std::string const&, TXMPMeta<std::string>*, bool&, MD5_CTX*, bool) in libXMPFilesStatic.a(SonyHDV_Handler.o)
      "TXMPMeta<std::string>::DeleteProperty(char const*, char const*)", referenced from:
          P2_MetaHandler::SetRelationsFromLegacyXML(bool) in libXMPFilesStatic.a(P2_Handler.o)
          P2_MetaHandler::SetDurationFromLegacyXML(bool) in libXMPFilesStatic.a(P2_Handler.o)
          P2_MetaHandler::SetGPSPropertyFromLegacyXML(XML_Node*, bool, char const*, char const*) in libXMPFilesStatic.a(P2_Handler.o)
          P2_MetaHandler::SetAltitudeFromLegacyXML(XML_Node*, bool) in libXMPFilesStatic.a(P2_Handler.o)
          P2_MetaHandler::ProcessXMP() in libXMPFilesStatic.a(P2_Handler.o)
          JPEG_MetaHandler::ProcessXMP() in libXMPFilesStatic.a(JPEG_Handler.o)
          MPEG4_MetaHandler::ProcessXMP() in libXMPFilesStatic.a(MPEG4_Handler.o)
    Any hint is appreciated. Thanks
    I found a hint here (Xcode Compile Error Undefined symbols for architecture x86_64:   "TXMPMeta<std::string>::Initialize() that a include statement would be missing, but that is defined in the dng sdk (dng_xmp_sdk.cpp):
    #if qMacOS
    #ifndef MAC_ENV
    #define MAC_ENV 1
    #endif
    #endif
    #if qWinOS
    #ifndef WIN_ENV
    #define WIN_ENV 1
    #endif
    #endif
    #include <new>
    #include <string>
    #define TXMP_STRING_TYPE std::string
    #define XMP_INCLUDE_XMPFILES qDNGXMPFiles
    #define XMP_StaticBuild 1
    #include "XMP.incl_cpp"
    This cannot be the reason..

    Thank you so much! That has worked!
    I have downloaded XCode 5.1.1 and the build ran without errors. But still I is unclear to me what has changed. The Xcode-project file included in the dng sdk was configured compiling on Mac OS SDK 1.6. Anyway, I can go on with that. Thanks again

  • I developed app in mac 10.6.8 with xcode 3.2.6.how can i run this app in ipad device

    i developed app in mac 10.6.8 with xcode 3.2.6.how can i run this app in ipad device

    actually i planned to get  provisioning profiles from apple by paying 99$ in following website
    https://developer.apple.com/programs/start/ios/ and followed by
    https://developer.apple.com/programs/start/standard/.
    but in last link,following thing were mentioned at bottom -
    Technical Requirements
    You must have an Intel-based Mac running OS X 10.8 Mountain Lion or later to develop and distribute iOS apps and Mac apps.
    but i\m using mac running OS X 10.6.8 snow leopard.
    Doubt:can't i run my app in ipad device?\
    Thank's in advance..

  • Serious problem with Xcode 4.3.2 - no GNU make

    There is a SERIOUS problem with Xcode 4.3.2.  I just installed it and when I click the downloaded package I jsut get a Xcode.app.
    No longer does it allow me to install packages.
    Instead I get nothing but an Xcode.app to drag and drop into /Applications.
    More terrible is the fact that it no longer ships with GNU make.  Which means nothing inside of the MacPort project will work anymore.
    For example:
    bash-3.2$ sudo port install make
    bash-3.2$ sudo port install gimp
    Warning: The Command Line Tools for Xcode don't appear to be installed; most ports will likely fail to build.
    Warning: See http://guide.macports.org/chunked/installing.xcode.html for more information.
    --->  Computing dependencies for gimpError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
    To report a bug, see <http://guide.macports.org/#project.tickets>

    The command line tools need to be installed separately.
    Go to Xcode->Preferences->Downloads
    Which is what the error message you got and the link it pointed to is teling you.

  • Help! Running Fortran program with Xcode

    Hi all,
    I am developing a Fortran code for a class project, I understand Matlab, but very little of advanced programming like Fortran or C++, but have to learn some for my class (note: it is not a programming class). The professor gave us a code to run and modify it, the code is supposed to work (and in fact it is working on windows computers). I didn't know how to run Fortran on a mac so I followed the instructions given in these links:
    http://www.macresearch.org/xcodegfortran_contest_winner_damienbobillot
    http://lists.apple.com/archives/fortran-dev/2006/Mar/msg00011.html
    I installed Xcode 2.4, and gfortran. After I made my Project on Xcode (following the links above), I clicked Build and it was successful, but after I clicked Build and Go I got the following error:
    Warning:Array reference at (1) is out of bounds
    Command/usr/local/bin/gfortran failed with exit code 1
    I don't know what does that mean. Can anyone help me with this?
    I would like some easy-to-follow instructions to run a Fortran program with Xcode, starting from the basics.
    It is hard to find an easy compiler for mac, PC people have qFortran (for free at at school) and things like that where you just have to click compile and that is it.
    Thanks!
    lbml

    I'd need to see your code to give details, but the error you got says you declared an array with a certain number of elements and then you tried to talk to the array outside those elements.
    For example you say:
    integer myArray(5)
    and then try to index either myArray(0) or myArray (6).
    Does that make sense. I have never tried to get fortran working with Xcode, but I did get Pascal working, so it is probably better is someone else helps you, but I will try if no one steps up.

  • Ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB)

    Hello, I'm writing on behalf of the MacPorts package management system. I am trying to update the MacPorts port of Oracle Instant Client from 10.2.0.4.0 to 11.2.0.3.0 (https://trac.macports.org/ticket/37880), and while many of our ports including the PHP oracle module continue to work fine with this version, soci (https://github.com/SOCI/soci/issues/89) and TOra (https://sourceforge.net/p/tora/bugs/867/) both fail to build, producing instead this error message:
    ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) for architecture x86_64
    This is on OS X 10.8.2 compiling with Xcode 4.6's version of clang ("Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)").
    I suspect this is because soci and TOra are doing something with static libraries, and Oracle Instant Client is only shipped as a dynamic library. But I can't explain why this worked with 10.2.0.4.0, unless something has changed about how Oracle Instant Client is being built. It's not clear whether this is an intentional change in Oracle Instant Client, and if it is, what developers should do to fix their software.
    I have not heard back from the developers of TOra, and the developers of soci suggested I ask here.

    Please check this Apple radar ( Bug ID# 12451551 ) filed . libociei.dylib was converted into a bundle to overcome the issue .
    Can you tell me the reasons for linking with libociei.dylib directly ? The exposed client interfaces are in the libclntsh.dylib file and we should only be linking against the client library.
    HTH.

  • My apple-id doesn't work with Xcode as a developer. Registration is completed, but the program don't know me as a developers ID.

    My apple-id doesn't work with Xcode as a developer. Registration is completed, but the program don't know me as a developers ID.

    Something as simple as your method of payment having expired could be causing your problems. Use the link below to check all info, especially your payment info, for your Apple ID.
    https://appleid.apple.com

  • [iPhone] Linking with libcrypto

    How does one actually link an Xcode, iPhone Application with a library like libcrypto? I've tried to add libcrypto.dylib to my Xcode iPhone project, and that doesn't work. The library is added but it appears in red.
    The iPhone system man pages claim support for libcrypto and libssl.
    Thanks,
    Bill

    Did you look at this [sample code|http://developer.apple.com/iphone/library/samplecode/CryptoExercise/index. html]?

  • How do I add URI web link with custom tooltip like "CLICK HERE TO UPDATE" instead of URI web link in tooltip.

    How do I add URI web link with custom tooltip like "CLICK HERE TO UPDATE" instead of URI web link in tooltip.

    You've probably found an answer to this by now, but I think this has been addressed in another forum -- The link below suggested using a button and adding the tooltip to the button. 
    https://forums.adobe.com/thread/304974?start=0&tstart=0
    Sounds like it would work but I haven't actually tried it. 
    Good luck~!

  • How to I get a link with a "Mail to" address to open up a Compose window in my Yahoo mail, rather than in the Mail progrom on my Mac. I do not use the Mac Mail program.

    How to I get a link with a "Mail to" address to open up a Compose window in my Yahoo mail, rather than in the Mail progrom on my Mac. I do not use the Mac Mail program.
    == This happened ==
    Not sure how often
    == always

    Thank you, "the-edmeister" -- You render a great service, one that lifts my spirits.
    Your answer also taught me to be a little more persistent, as I had started looking at Preferences, and just didn't notice the icons (including Applications) at the top of that window that would have led me to my answer.
    Dave

  • PO Service not link with AP invoice service

    Currently usiing SBO 2007A, SP-00, PL 49.
    I have 1 PO service. Base on this PO service, I create AP Invoice service.
    The account no. use in PO service is different from account no. use in AP Invoice service. Since account no. have been overwrite in AP Invoice.
    PO service is missing link with AP Invoice.
    When we open again the PO we couldn't find target document.
    Also same when we open AP Invoice, we couldn't find base document, which is actually the PO.
    Only in AP Invoice's remark we can find the PO no.
    Also in the database, in AP Invoice table base document no. is blank.
    Also it cause the PO not automatically close.
    Previous PL, this error not exist.
    Any one can help.
    Thanks in advance,
    Surya

    Hi,
    Please check Note No. : [ 1334491|https://websmp130.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1334491] which explains the reported issue.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Can I Select from table skipping extents linked with lost datafiles?

    Hi~,
    I need your help to recover my database.
    I'm using oracle 9.2.0.8 at Fedora 3 with no-archive mode.
    and I don't have any backup.
    Last night, I experenced hard disk failure.
    I tried OS-level recovery, but I lost some datafiles of tablespace.
    anyway, I wanted to recover my database without data of lost datafiles.
    so, I issued "alter database datafile offline drop" and
    start oracle instance.
    But, datafiles were not removed from dba_data_files view and
    extents linked with lost datafiles were not removed from dba_extents view!
    Selecting query of some table containing extents linked with lost data files,
    I got "ORA-00376: file xxx cannot be read at this time" message.
    So, my question is that..
    HOW CAN I SELECT FROM THAT TABLE WITHOUT SCANNING EXTENTS LINKED WITH LOST DATA FILES?
    Thanks.

    Hi,
    Without being in archivelog and without backup, one can't do any sort of recovery. That's why backups and archivelog are so so important.
    The offline data file command never does actually drop the datafile. It merely indicates to the control file that now the said tablespace will also be dropped. This won't update any view that the files are not supposed to be used or shown to you anymore.
    This is what documentation says about the recovery of the database in the NoARch mode,
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/osrecov.htm#i1007937
    You do need a backup in order to get those tables being read. Oracle doesn't have any feature which can offline/skip the missing extents for you and let you read the data without them.
    HTH
    Aman....

Maybe you are looking for