Linking with Sunperformance library

Hi
I trying to link with static version of libsunperf. So I link with
libsunperf.a
from Studio 12.2 but get the errors
ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.500
Undefined first referenced
symbol in file
__mt_ibarrier_rtc_ /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
__mt_static_for_loop /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
__mt_get_next_chunk_invoke_mfunc_once_ll_ /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
__omp_in_parallel_ /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
__f90_allocate2 /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
__omp_get_max_threads_ /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
__mt_MasterFunction_cxt_ /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
__f90_deallocate /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
ld: fatal: Symbol referencing errors. No output written to bld/newbury/devel/default/sunc-12.2.0/bin/mosek
How can I resolve that? Note I would prefer to use sunperf in sequential mode.
Thanks.
Erling

Sorry and thanks. It still have a problem.
eda@newbury:~/mosekdbg$ cc -# testblas.c -o testblas -library=sunperf -staticlib=sunperf -lc -lm
### cc: Note: NLSPATH = /remote/public/solaris/x86/S12.2/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/remote/public/solaris/x86/S12.2/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
### command line files and options (expanded):
### -# testblas.c -otestblas -library=sunperf -staticlib=sunperf -lc -lm
/remote/public/solaris/x86/S12.2/prod/bin/acomp -Qy -Xa -xc99=%all,no%lib -i testblas.c -D__SunOS_5_10 -D__SUNPRO_C=0x5110 -D__unix -D__SVR4 -D__sun -D__SunOS -D__i386 -D__BUILTIN_VA_ARG_INCR -D__C99FEATURES__ -D__PRAGMA_REDEFINE_EXTNAME -Dunix -Dsun -Di386 -D__RESTRICT -D__FLT_EVAL_METHOD__=-1 -D__SUN_PREFETCH -I-xbuiltin -I/remote/public/solaris/x86/S12.2/prod/include/cc -fsimple=0 -m32 -fparam_ir -xF=%none -xdbggen=no%stabs+dwarf2+usedonly -xdbggen=incl -xldscope=global "-g/remote/public/solaris/x86/S12.2/prod/bin/cc -library=sunperf -staticlib=sunperf -lc -lm " -destination_ir=yabe -y-fbe -y/remote/public/solaris/x86/S12.2/prod/bin/fbe -y-verbose -y-comdat -y-xarch=generic -y-comdat -y-xthreadvar=no%dynamic -y-o -ytestblas.o -y-s
/remote/public/solaris/x86/S12.2/prod/bin/fbe -s -o testblas.o -warn=%none -Qy /tmp/yabeAAAMFaOGL
rm /tmp/yabeAAAMFaOGL
### cc: Note: LD_LIBRARY_PATH = (null)
### cc: Note: LD_RUN_PATH = (null)
### cc: Note: LD_OPTIONS = (null)
ln -s /remote/public/solaris/x86/S12.2/prod/lib /tmp/lib_link.1340957116.19204.01
/usr/ccs/bin/ld -zld32=-S/tmp/lib_link.1340957116.19204.01/libldstab_ws.so -zld64=-S/tmp/lib_link.1340957116.19204.01/amd64/libldstab_ws.so -zld32=-S/tmp/lib_link.1340957116.19204.01/libld_annotate.so -zld64=-S/tmp/lib_link.1340957116.19204.01/amd64/libld_annotate.so /remote/public/solaris/x86/S12.2/prod/lib/crti.o /remote/public/solaris/x86/S12.2/prod/lib/crt1.o /remote/public/solaris/x86/S12.2/prod/lib/values-xa.o testblas.o -lc -lm -o testblas -Y "P,/remote/public/solaris/x86/S12.2/lib:/remote/public/solaris/x86/S12.2/prod/lib:/usr/ccs/lib:/lib:/usr/lib" -Qy -R/remote/public/solaris/x86/S12.2/lib -Bstatic -lsunperf -Bdynamic -lfui -lfsu -lsunmath -lmtsk -lpicl -lm -lc /remote/public/solaris/x86/S12.2/prod/lib/crtn.o
Undefined first referenced
symbol in file
__mt_static_for_loop /remote/public/solaris/x86/S12.2/prod/lib/libsunperf.a(dtrsm_x86g.o)
ld: fatal: Symbol referencing errors. No output written to testblas

Similar Messages

  • Can an ipod only be linked with one library on itunes on one computer?

    I have set up my ipod on one computer and downloaded a load of music on to it. now i want to put more music on from another computer but the computer is telling me that all the music i have on it already will be replaced by this new library from a different computer. Can't an ipod be linked with two different librarys without all music being deleted?

    See: Using iPod with multiple computers.

  • Link with network library functions

    Hi C gurus,
    we have a problem compiling software from outside with the latest Studio 12.3 compiler. We have the following command
    CC -m64 -xlang=f90,c99 -o mars mars.o -L/usr/lib libmars.a /soft/ECMWF/emos-64_i86pc/libemosR64.a -L/opt/solarisstudio12.3/lib -lsunmath -L/soft/EC MWF/grib_api-64_i386/lib -lgrib_api -L/soft/jasper-64_i86pc/lib -ljasper -lm
    and get linker errors like
    Undefined first referenced
    symbol in file
    bind libmars.a(tcp.o)
    sys_nerr libmars.a(environ.o)
    getsockname libmars.a(server.o)
    accept libmars.a(netbase.o)
    xdr_string libmars.a(marsxdr.o)
    xdr_pointer libmars.a(marsxdr.o)
    listen libmars.a(server.o)
    gethostbyaddr libmars.a(tcp.o)
    gethostbyname libmars.a(tcp.o)
    socket libmars.a(tcp.o)
    xdr_bytes libmars.a(marsxdr.o)
    getdomainname libmars.a(environ.o)
    setsockopt libmars.a(tcp.o)
    connect libmars.a(tcp.o)
    xdrrec_create libmars.a(netbase.o)
    xdrmem_create libmars.a(account.o)
    xdrrec_skiprecord libmars.a(queue.o)
    xdr_free libmars.a(queue.o)
    xdr_long libmars.a(marsxdr.o)
    inet_addr libmars.a(tcp.o)
    inet_ntoa libmars.a(tcp.o)
    sys_errlist libmars.a(environ.o)
    xdrrec_endofrecord libmars.a(queue.o)
    xdr_int libmars.a(marsxdr.o)
    shutdown libmars.a(webbase.o)
    Some of this function are Network library function. See http://docs.oracle.com/cd/E19683-01/817-0696/6mgfrf0gr/index.html
    Do we miss some options or flags the CC command line?
    Any help or hints are warmly welcome
    Anton

    You say you are having trouble with Studio 12.3. Did this code work before with some earlier Studio version? I suspect not, because you need to link system libraries that are not on the CC command line that you show.
    First, some general comments.
    1. The -xlang=f90 option should be used if and only if you are linking Fortran 90 binaries to your program. Ditto for -xlang=c99 and C 99.
    2. Never use -L options that point into /usr/lib or into the compiler installation area. The CC driver knows where to find default system libraries and in what order to search for them. Specifying these directories with -L can cause the wrong libraries to be linked. If you added those options because they seemed to solve a linking problem, something else is wrong, and should be fixed.
    Now some specifics about missing libraries.
    Check the man page for a missing function, and see if the man page lists a library that needs to be linked. Unfortunately, not all man pages are so helpful. Let's track down one set of functions as an example of how to find the missing library.
    A set of missing functions starts with "xdr". Let's try "man xdr_string". Although the page does not tell you what library to link, the man page is in section 3NSL, and some xdr functions in the "see also" are in the same section. Is there a library with nsl in its name?
    % cd /usr/lib
    % ls -R | grep nsl
    libnsl.so
    % nm libnsl.so | grep xdr_
    [ long list of xdr functions]So we know we need to add -lnsl to the CC command line. Repeat this process until done.
    The author of an application library usually knows what system libraries to link, and a helpful programmer would include this information in README or man page for the application libraries that you are using. Did you check for documentation first?

  • Ipod photo breaks link with library

    My ipod said it was not linked to my library the other day. I have always updated from that machine and this was a first. I had it link to that library and it updated all 2000 songs to the ipod. Most of that 2000 were already on there. Does this have something to do with choosing to update songs manually? Can you swirtch between manual and automatic without it updating the entire library again? Was it because I updated to itunes 5?

    What was the exact error message ?
    Check out the iPod Troubleshooting FAQ, particularly the section labelled "Moving / Loading Files"
    Good luck

  • Mmeasure accurate time: Which library to link with

    Hi,
    I'm trying to use the procedure described here to measure accurate time. However, when trying to build I get:
    Undefined symbols for arcitechture x86_64;
    "_AbsoluteToNanoseconds", referenced from:
    What should I add to the build command to link with the correct library? And is there a general way to find out which library defines a function, without asking in the forums?

    I'd like to measure elapsed time with the best accuracy possible. This (old) article seems to fit my needs best, but I'd love to hear a better solution.
    I tried the code in listing 2 and now it builds successfully. Thanx!
    Could u plz also tell me where u found it was deprecated in 10.8?

  • My itunes in pc fails to secure link with itunes store it shows the process bar it automatically quits the process it also does not shows any on the screen. i am using windows xp service pack 3. what shoul i do?

    my itunes in pc fails to secure link with itunes store it shows the process bar it automatically quits the process it also does not shows any on the screen. i am using windows xp service pack 3. what shoul i do?
    Diagnostics test
    Microsoft Windows XP Professional Service Pack 3 (Build 2600)
    ECS G31T-M7
    iTunes 10.5.2.11
    QuickTime 7.6.9
    FairPlay 1.13.37
    Apple Application Support 2.1.6
    iPod Updater Library 10.0d2
    CD Driver 2.2.0.1
    CD Driver DLL 2.1.1.1
    Apple Mobile Device 4.0.0.97
    Apple Mobile Device Driver 1.57.0.0
    Bonjour 3.0.0.10 (333.10)
    Gracenote SDK 1.9.5.502
    Gracenote MusicID 1.9.5.115
    Gracenote Submit 1.9.5.143
    Gracenote DSP 1.9.5.45
    iTunes Serial Number 0012ABAC07F3CCB0
    Current user is an administrator.
    The current local date and time is 2011-12-31 14:06:21.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is enabled.
    HDCP is not supported.
    Core Media is not supported. (16005)
    Video Display Information
    Intel(R) G33/G31 Express Chipset Family
    **** External Plug-ins Information ****
    No external plug-ins installed.
    **** Network Connectivity Tests ****
    Network Adapter Information
    Adapter Name:        {7599FAD1-1BB9-4AC6-80AF-404253DC519E}
    Description:            Atheros L2 Fast Ethernet 10/100 Base-T Controller - Packet Scheduler Miniport
    IP Address:             192.168.1.5
    Subnet Mask:          255.255.255.0
    Default Gateway:    192.168.1.1
    DHCP Enabled:      Yes
    DHCP Server:         192.168.1.1
    Lease Obtained:     Sat Dec 31 13:46:09 2011
    Lease Expires:       Tue Jan 03 13:46:09 2012
    DNS Servers:         192.168.1.1
    Active Connection: LAN Connection
    Connected:             Yes
    Online:                    Yes
    Using Modem:        No
    Using LAN:             Yes
    Using Proxy:           No
    SSL 3.0 Support:     Enabled
    TLS 1.0 Support:     Enabled
    Firewall Information
    Windows Firewall is on.
    iTunes is enabled in Windows Firewall.
    Connection attempt to Apple web site was successful.
    Connection attempt to browsing iTunes Store was successful.
    Connection attempt to purchasing from iTunes Store was successful.
    Connection attempt to iPhone activation server was unsuccessful.
    The network connection timed out.
    Connection attempt to firmware update server was unsuccessful.
    The network connection timed out.
    Connection attempt to Gracenote server was successful.
    Last successful iTunes Store access was 2011-12-31 14:00:02.
    **** Device Connectivity Tests ****
    iPodService 10.5.2.11 is currently running.
    iTunesHelper 10.5.2.11 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    Universal Serial Bus Controllers:
    Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27C8.  Device is working properly.
    Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27C9.  Device is working properly.
    Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27CA.  Device is working properly.
    Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 27CB.  Device is working properly.
    Intel(R) 82801G (ICH7 Family) USB2 Enhanced Host Controller - 27CC.  Device is working properly.
    No FireWire (IEEE 1394) Host Controller found.
    Connected Device Information:
    rawkiss’s iPhone, iPhone 3G running firmware version 4.0
    Serial Number:       86931UEAY7H
    **** Device Sync Tests ****
    Sync tests completed successfully.

    I have found a fix after doing additional research through this forum. Tech Note #328730 addresses this problem and it works for Photoshop Album 3.2 even though it was written for release 1.0.
    Here is a link that will take you directly to the Tech Note:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=328730
    When using this fix the Tech Note indicates:
    "Imported image data and tags are lost when you re-create the My Catalog.psa file, so you need to reimport images and reapply any tags"
    however it did retain the captions (at least it did for me).

  • Can I use the remote app on my iphone to link with the ipad2 ?

    Can I use the remote app on my iphone to link with the ipad2 ?

    This is to control the music library to be more specific.

  • Is there any hope of apple adding a 're-link with media folder'-type function to iTunes?

    Is there any hope of apple adding a 're-link with media folder'-type function to iTunes?
    I have 1000s of broken links after installing the latest version of iTunes and updating some files in my media folder. The location of my itunes library has not changed, and all the files are there (I know because I've just waited several hours for the files to be updated by my ultra-slow computer) - by my logic, there should be some menu option that simply re-synchronises with the media folder, just like itunes would do with an ipod - it can't be that hard can it? The only way I can restore a link is by clicking every song (I have over 28,000) and locating the file in the folder that iTunes claims to use as its media folder - the new version 10 option of then using this location to restore all broken links doesn't work because it only looks in the specific album file, and after a couple of times this dialog box no longer even comes up, so I couldn't ask it to do this even if I wanted to. At the moment the only option I can see is to completely wipe iTunes and re-load all my music from scratch - using my tired and over-worked computer this will realistically take around 15 hours that I don't have, and my computer will melt in the process. I wish I'd never tried to 'tidy up' my iTunes library...
    PLEASE Apple, how hard can it be to have a function that searches for and restores broken links by itself????? I've told you where the music is - just flipping look for it yourself instead of getting me to do it!

    You don't have to re-rip, re-import or re-download all your content. You can clear the iTunes library, either by selecting all in the libary and pressing the Delete key, saying "no" when it asks if you want to remove the files themselves, and then use the Add To Library command, selecting the iTunes Media folder (or iTunes Music folder, as applicable to your situation), and that will add back all your content. It shouldn't take more than a few minutes; if it does, something may be amiss with your hard drive or the library file is corrupted (in which case just delete the library file and re-do the Add To Library command).
    Regards.

  • Can no longer link to iTunes library on local net

    I've been using a 2011 Mini for my media server for about a year. It holds my iTunes library and has always worked fine. I often linked to it with my Macbook to have music in my home office.
    After upgrading both machines to Mavericks and iTunes 11.1.3, I can no longer link to the library with the Macbook. right after the upgrade, I could navigate to the Mini's /Music library, but not down to the iTunes subfolder; the subfolders did not appear in the selection menu. It would act as if the /Music folder was at the end of the tree. I tinkered with the sharepoints on the mini, and took out the /Music share and added one for /iTunes. Now iTunes on my Macbook ususally crashes when I select that.
    I am able to navigate the Mini's disk with the finder from my Macbook ok, so sharing appears to work.
    Itunes continues to work fine on the Mini playing its own library, and the MacBook works fine with its little library.
    I have used Tuneup 2.0 for over a year and been very happy with it. I recently upgraded to Tunepe 3.0, which seems to be a big step backward, but I had the problem before running the new version.
    I'm really frustrated and would be very grateful for any help or insights.
    John Purtell

    Hi there,
    For the past few months, I've had no problem
    connecting to my friend's iMac over a local network.
    Lately, when I click connect, the ftp dialogue pops
    up rather than the "connect to server" dialogue. I
    don't want no stinking ftp.
    Confusing...
    When you say "when I click connect" what are you clicking on?
    What happens if you press command + K and in the connect to server window enter the server's IP address?

  • Won't sync purchased items, "linked to another library on computer ****"

    I keep getting an error message that says I can't sync videos to my iPod as this iPod is linked to another library (and gives a computer code in a lot of digits and letters).
    How do I sync the video across without losing the content already on the iPod?
    I have the manually manage music and video boxes tagged - and I have purchased videos and songs, transferred them to my iPod then deleted them off the hard drive (backed up to disk, but disk in storage). I just want to add to the files already on the iPod - I don't want to lose what's already on there. I've tried changing my iPod to disk mode, I have deauthorised then authorised the 2 accounts I use on the computer, and it still won't work.
    Can anyone help me with an idea or suggestions please?

    Andrew J wrote:
    Try selecting "check for purchases" in iTunes>store menu.(Make sure you're signed up and logged in to your account). As for library location go to preferences>advanced>general and select your music folder location there.
    That's the kicker. I did all that stuff in regards to checking for purchases, authorizing the computer, etc.
    My "library" is now where I told iTunes to deal with it, yet, it still deals with my library in the old location (iTunes Library and XML files as well as Mobile Applications).
    I haven't rebooted my PC, but I sure hope that's not the reason.

  • Is it possible to give link of document library in sharepoint list in 2010

    Hi All,
    Using share point list data we have shown in reports. For this we create 1 view and shown as reports. we have 1 document library with title field, same field is in list also.when we click on link on list - it redirects to library folder.
    Is their anyway to do that where as list is custom list.
    Any help is appreciated..!

    Hi Bangara,
    According to your description, my understanding is that you want to create a link in your list, then this link is linked to a library folder. Is it right?
    You can create a Hyperlink field in your list as opening your list->clicking on ‘Create Column’ under List ribbon, then type a name for the column, select the type of the column is Hyperlink or Picture, and Format URL is :Hyperlink.
    After that, when you create a new item or edit an item in the list, you can type the URL of the related library folder in this link field.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Runtime error in linking with static variables....

    Hi,
    I am building a shared library which includes a compiled object generated from a class containing the static variables only and also I have another version of same class with same & some new static variables in it and using that to generate another shared library. Now when I tried to run a program
    which links with both the library it core dumps when it tries to return from the program i.e when it finishes.
    Can someone please help me explain why my program is behaving like that?? Can duplicate inculsion of static variables in different scope can cause problem ?? How can this be avoided ?
    Also please be advised that the class with static variables gets generated at the compile time using a script which uses a DTD whose version (specification) can be different in both the libraries therefore I can't just seperate the common stuff into one class and specific into another.
    Thanks.
    Rajeev.

    Not to worry...found the answer in another post. Seems like patches need to applied to the OS.

  • Lost link between iPhoto library and iPhoto.app

    While learning how to use Photoshop Elements 4.0 and Bridge, I made the choice to "browse" in Bridge. When I next started iPhoto 6.06, my link to the Library was lost. I have worked with AppleCare support, done every exercise short of creating a new library and losing my organization. With 20,000 + photos I would like to avoid that exercise. I do have backups but am trying to figure out if I can solve this any other way. All my files are still in iPhoto Library, and I can see the organization of my albums in Bridge. With some exercises, I get the message: "Unreadable files: 1. The following file could not be imported: '/Users/john/Pictures/iPhoto Library/Library.iPhoto.'"
    If I delete Adobe Photoshop Elements and Bridge from the hard drive, will this help? I promise I did not do anything within iPhoto Library in Finder!
    Thanks so much!
    iMac   Mac OS X (10.4.9)   iPhoto 6.06
    iMac   Mac OS X (10.4.9)   iPhoto 6.06
    iMac   Mac OS X (10.4.9)   iPhoto 6.06

    cdkayak
    Welcome to the Apple Discussions.
    There's absolutely no harm in using PSE with iPhoto, it's Bridge that's a killer. So that's what you chuck from your machine. Set up PSE as an external editor in the iPhoto Preferences. That way you can double click a pic in iPhoto and it will open automatically in PSE, save it PSE and have it come back into iPhoto seamlessly.
    What's likely happened here is that you have (or Bridge has) made changes in the iPhoto Library Folder which has broken the link between iPhoto and the library files.
    Some things to try:
    Hold down the option (or alt) key and launch iPhoto. Choose Locate, and point iPhoto at the iPhoto Library Folder.
    What Back Ups do you have? If there's an up-to-date one, then try copying the library6.iphoto file from it to the iPhoto Library Folder allowing it to overwrite the confused one.
    That said, if these don't work, your options will only be to create and populate a new library: To create and populate a new library:
    Note this will give you a working library with the same film rolls and pictures as before, however, you will lose your albums, keywords, books, calendars etc.
    Move the iPhoto Library Folder to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library Folder on your desktop and find the Originals folder. From the Originals folder drag the individual rolls to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library Folder on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.
    Finally, the message
    "Unreadable files: 1. The following file could not be imported: '/Users/john/Pictures/iPhoto Library/Library.iPhoto.'"
    is because iPhoto will not import a picture that's in the active iPhoto Library Folder - a sensible precaution against duplication.
    Regards
    TD

  • [SOLVED] mingw32 cross compile won't link with static libraries

    Hi all,
    I'm trying to cross compile an app I have written to i486-mingw32.  I'm running Arch 64-bit (under which it compiles fine natively), and I have installed the mingw32 binaries along with mingw32-boost-static from AUR.
    All seems well, but unfortunately when I cross compile my code libtool refuses to link to the static Boost libraries:
    *** Warning: Trying to link with static lib archive /usr/i486-mingw32/lib/libboost_filesystem-mt-s.a.
    *** I have the capability to make that library automatically link in when
    *** you link to this library. But I can only do this if you have a
    *** shared version of the library, which you do not appear to have
    *** because the file extensions .a of this argument makes me believe
    *** that it is just a static archive that I should not use here.
    This then leads to undefined references as the library is not linked in.  But as I *want* the static version of the library, does anyone know how to tell libtool to accept the .a file and link it?
    Last edited by Malvineous (2011-05-02 02:44:48)

    Just to follow up on this, I discovered the problem.  It turns out libtool was doing the correct thing, and refusing to link the static library in with the shared one (otherwise later this could result in something being defined multiple times.)  The undefined references were unrelated to the error above, and the code that was causing them (in a different Boost header file) could be easily #defined out.
    When the time came to link the actual executables, libtool did include all the necessary libraries and everything worked as it should!

  • Iphone sync with new library

    I orginally synced and starting using my iphone4 with one laptop. Now I want to change and always sync and manage my iphone from a new laptop. Right now I want to update the iOS, but before I can do that, I need to get all my apps from the iphone to my new laptop itunes library. How? When I try to sync with new library which has no apps, I get a message that my iphone apps will be lost.
    How can I move forward??
    thx.

    All iTunes content on your iPhone - all music, movies, tv shows, and 3rd party apps should be in your iTunes library on your computer for this and several other reasons. All apps on your iPhone would be in your iTunes library if Sync Apps had been selected under the Apps tab for your iPhone sync preferences with iTunes. With this selected, after downloading an app direct with your iPhone the app will be copied to your iTunes library automatically the first time you sync your iPhone with iTunes after doing so. This also provides for downloading an app with iTunes on your computer and installing the app on your iPhone via the iTunes sync process, and for removing an app from your iPhone without deleting the app by deselecting the app under the Apps tab followed by a sync. To reinstall the app again later, reselect the app under the Apps tab followed by a sync. This also provides for transferring your entire iTunes library from one computer to another per the link provided.
    First you need to authorize your new laptop with your iTunes account with iTunes. With your iPhone connected and without syncing, at the iTunes menu bar go to File and select Transfer Purchases From - the name of your iPhone.
    After confirming all 3rd party apps on your iPhone were transferred to your iTunes library, select Sync Apps under the Apps tab and make sure all apps below are selected. Select Apply.

Maybe you are looking for