Professional Web Applications Themes

Compiling C source with MSVC 6.0 - IBM DB2

On Windows you need to link with "sqllib\lib\db2api.lib". You might find more info in the Application Building Guide: [url]http://www-3.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/v7pubs.d2w/en_main[/url] -- Larry Menard IBM Workstation Database (DB2) Performance Team Defender of Geese and of All Things Natural "LeszekP." <leszek_pgo2.pl> wrote in message news:14f159c9.0307090750.4e9956a0posting.google.c om... > Hi All, > I'm new using DB2 (PE v.8, Win2000) and need some basic > help/information. > I've installed DB2 PE on my laptop and try to compile simple c source > (taken from sqllib/samples directory). What I see in VC++ window is an > error message as follows: > > Linking... > dbinfo.obj : error ...

  1. #1

    Default Re: Compiling C source with MSVC 6.0

    On Windows you need to link with "sqllib\lib\db2api.lib".

    You might find more info in the Application Building Guide:

    [url]http://www-3.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/v7pubs.d2w/en_main[/url]
    --
    Larry Menard
    IBM Workstation Database (DB2) Performance Team
    Defender of Geese and of All Things Natural


    "LeszekP." <leszek_pgo2.pl> wrote in message
    news:14f159c9.0307090750.4e9956a0posting.google.c om...
    > Hi All,
    > I'm new using DB2 (PE v.8, Win2000) and need some basic
    > help/information.
    > I've installed DB2 PE on my laptop and try to compile simple c source
    > (taken from sqllib/samples directory). What I see in VC++ window is an
    > error message as follows:
    >
    > Linking...
    > dbinfo.obj : error LNK2001: unresolved external symbol _InstanceDetach
    > dbinfo.obj : error LNK2001: unresolved external symbol _InstanceAttach
    > dbinfo.obj : error LNK2001: unresolved external symbol
    > _CmdLineArgsCheck3
    > dbinfo.obj : error LNK2001: unresolved external symbol _SqlInfoPrint
    > dbinfo.obj : error LNK2001: unresolved external symbol _db2CfgGet12
    > dbinfo.obj : error LNK2001: unresolved external symbol _db2CfgSet12
    > Debug/dbinfo.exe : fatal error LNK1120: 6 unresolved externals
    >
    > As I remember on AIX it was necessary to link with db2 using -ldb2
    > parameter.
    > Could someone tell me how to do that in win2000/vc++ ?
    >
    > Some links to doents/previous discussions which could help also
    > appreciated.
    >
    > Thx in advance,
    > LeszekP

    Larry Menard Guest

  2. #2

    Default Re: Compiling C source with MSVC 6.0

    If i read the makefile under samples\c
    i see a line like :
    link -debug -out:%1.exe %1.obj utilemb.obj db2api.lib

    so i guess you did not use it.

    Take 5-10 minutes to read the readme, makefile, *.bat and the html
    doc/samples.

    PM


    "LeszekP." <leszek_pgo2.pl> a écrit dans le message de news:
    [email]14f159c9.0307090750.4e9956a0posting.google.com[/email]...
    > Hi All,
    > I'm new using DB2 (PE v.8, Win2000) and need some basic
    > help/information.
    > I've installed DB2 PE on my laptop and try to compile simple c source
    > (taken from sqllib/samples directory). What I see in VC++ window is an
    > error message as follows:
    >
    > Linking...
    > dbinfo.obj : error LNK2001: unresolved external symbol _InstanceDetach
    > dbinfo.obj : error LNK2001: unresolved external symbol _InstanceAttach
    > dbinfo.obj : error LNK2001: unresolved external symbol
    > _CmdLineArgsCheck3
    > dbinfo.obj : error LNK2001: unresolved external symbol _SqlInfoPrint
    > dbinfo.obj : error LNK2001: unresolved external symbol _db2CfgGet12
    > dbinfo.obj : error LNK2001: unresolved external symbol _db2CfgSet12
    > Debug/dbinfo.exe : fatal error LNK1120: 6 unresolved externals
    >
    > As I remember on AIX it was necessary to link with db2 using -ldb2
    > parameter.
    > Could someone tell me how to do that in win2000/vc++ ?
    >
    > Some links to doents/previous discussions which could help also
    > appreciated.
    >
    > Thx in advance,
    > LeszekP

    PM \(pm3iinc-nospam\) Guest

Similar Threads

  1. MSVC++ link error
    By nik in forum PERL Modules
    Replies: 1
    Last Post: February 24th, 07:19 AM
  2. Replies: 6
    Last Post: January 11th, 12:44 AM
  3. Reinstalling CF Server 5 w/Win2K SP4 & MFC/MSVC 6.0
    By phildot in forum Coldfusion Server Administration
    Replies: 0
    Last Post: August 28th, 09:54 PM
  4. [WIN] Ruby9i compiled using MSVC++ 6.0
    By Shashank Date in forum Ruby
    Replies: 2
    Last Post: July 7th, 12:19 PM
  5. Hide source, compiling, whatever!
    By Mike in forum PERL Miscellaneous
    Replies: 5
    Last Post: June 30th, 11:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139