Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help me to reslove this linking error,please..

Help me to reslove this linking error,please..

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++java
12 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SnaKeBeD
    wrote on last edited by
    #1

    while trying to make a java compatible dll for my application i'm getting a linking error msg in VC++ (VS6.0) as error LNK2001 : unresolved external symbol _imp_mciSendCommandA@16 i'm using this dll for accessing the mic. can anybody help me in solving this problem

    swaroop

    T H 2 Replies Last reply
    0
    • S SnaKeBeD

      while trying to make a java compatible dll for my application i'm getting a linking error msg in VC++ (VS6.0) as error LNK2001 : unresolved external symbol _imp_mciSendCommandA@16 i'm using this dll for accessing the mic. can anybody help me in solving this problem

      swaroop

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      did you correctly provide the .lib file to you linker settings ?


      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      S 1 Reply Last reply
      0
      • S SnaKeBeD

        while trying to make a java compatible dll for my application i'm getting a linking error msg in VC++ (VS6.0) as error LNK2001 : unresolved external symbol _imp_mciSendCommandA@16 i'm using this dll for accessing the mic. can anybody help me in solving this problem

        swaroop

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        Did you import Winmm.lib?


        WhiteSky


        S 1 Reply Last reply
        0
        • T toxcct

          did you correctly provide the .lib file to you linker settings ?


          [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

          S Offline
          S Offline
          SnaKeBeD
          wrote on last edited by
          #4

          yes, all the lib files needed for the function is given in the settings of the VS 6.0.. as per the msdn winmm,lib is the lib file needed for that and still the problem exist. also two more header file is needed for the function is also included.

          swaroop

          T 1 Reply Last reply
          0
          • H Hamid Taebi

            Did you import Winmm.lib?


            WhiteSky


            S Offline
            S Offline
            SnaKeBeD
            wrote on last edited by
            #5

            yes, i imported that library . but still the error showing

            swaroop

            D 1 Reply Last reply
            0
            • S SnaKeBeD

              yes, all the lib files needed for the function is given in the settings of the VS 6.0.. as per the msdn winmm,lib is the lib file needed for that and still the problem exist. also two more header file is needed for the function is also included.

              swaroop

              T Offline
              T Offline
              toxcct
              wrote on last edited by
              #6

              did you try a C linkage ? because your symbole seems to be mangled...


              [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

              S 1 Reply Last reply
              0
              • T toxcct

                did you try a C linkage ? because your symbole seems to be mangled...


                [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                S Offline
                S Offline
                SnaKeBeD
                wrote on last edited by
                #7

                if u don mind, could u please tell how to use c linker

                swaroop

                T 1 Reply Last reply
                0
                • S SnaKeBeD

                  if u don mind, could u please tell how to use c linker

                  swaroop

                  T Offline
                  T Offline
                  toxcct
                  wrote on last edited by
                  #8

                  extern "C"[^] before the name of the method in the declaration in the header


                  [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                  S 1 Reply Last reply
                  0
                  • T toxcct

                    extern "C"[^] before the name of the method in the declaration in the header


                    [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                    S Offline
                    S Offline
                    SnaKeBeD
                    wrote on last edited by
                    #9

                    the function i mentioned in the error is a inbuilt function for handling the mic's and all should i use extern for that also, if so hw?

                    swaroop

                    T 1 Reply Last reply
                    0
                    • S SnaKeBeD

                      the function i mentioned in the error is a inbuilt function for handling the mic's and all should i use extern for that also, if so hw?

                      swaroop

                      T Offline
                      T Offline
                      toxcct
                      wrote on last edited by
                      #10

                      man, your _imp_mciSendCommandA() function if declared in a header file, right ? then prepend its declaration with a extern "C"... like this for instance :

                      extern "C" int _imp_mciSendCommandA(int);


                      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                      S 1 Reply Last reply
                      0
                      • T toxcct

                        man, your _imp_mciSendCommandA() function if declared in a header file, right ? then prepend its declaration with a extern "C"... like this for instance :

                        extern "C" int _imp_mciSendCommandA(int);


                        [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                        S Offline
                        S Offline
                        SnaKeBeD
                        wrote on last edited by
                        #11

                        sorry for troubling u again , Actually i'm not declaring that function in my code...i'm just using that function, where the function is declared in Mmsystem.h(inbuilt header file)... i use this function to open the mic,close the mic and for recording.. syntax of the function in mmsystem.h WINMMAPI MCIERROR WINAPI mciSendCommandA(MCIDEVICEID mciID,UINT uMSG,DWORD dwparam1,DWORD dwparam2); sorry for the trouble..please reply

                        swaroop

                        1 Reply Last reply
                        0
                        • S SnaKeBeD

                          yes, i imported that library . but still the error showing

                          swaroop

                          D Offline
                          D Offline
                          David Crow
                          wrote on last edited by
                          #12

                          swaroopkb wrote:

                          yes, i imported that library .

                          How? Saying you did it, and doing it right, are not always the same thing.


                          "A good athlete is the result of a good and worthy opponent." - David Crow

                          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups