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. error LNK 2001 in visual C++ 6.0

error LNK 2001 in visual C++ 6.0

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++tutorialquestion
33 Posts 4 Posters 1 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 sindhumahe

    by "include in usage" waht do u mean ? just add the path in the include files?

    E Offline
    E Offline
    Eugen Podsypalnikov
    wrote on last edited by
    #5

    No, include the lib of the unresolved symbol to the linking process. It could be perform in a .cpp file as following too :) : #pragma comment(lib, "NameOfLibOfUnresolvedSymbol.lib")

    virtual void BeHappy() = 0;

    S 1 Reply Last reply
    0
    • E Eugen Podsypalnikov

      No, include the lib of the unresolved symbol to the linking process. It could be perform in a .cpp file as following too :) : #pragma comment(lib, "NameOfLibOfUnresolvedSymbol.lib")

      virtual void BeHappy() = 0;

      S Offline
      S Offline
      sindhumahe
      wrote on last edited by
      #6

      oh thanks a lot. but mine is a .mak file . while building it i am facing such errors. how to link the libraries to the .mak file? any commands available?

      E 2 Replies Last reply
      0
      • S sindhumahe

        oh thanks a lot. but mine is a .mak file . while building it i am facing such errors. how to link the libraries to the .mak file? any commands available?

        E Offline
        E Offline
        Eugen Podsypalnikov
        wrote on last edited by
        #7

        Probably you could extend your line by the needed lib :) : libraries- libgroupsock.lib, libusageenvironment.lib,libbasicusageenv.lib and liblivemedia.lib, NEEDED.lib

        virtual void BeHappy() = 0;

        1 Reply Last reply
        0
        • S sindhumahe

          oh thanks a lot. but mine is a .mak file . while building it i am facing such errors. how to link the libraries to the .mak file? any commands available?

          E Offline
          E Offline
          Eugen Podsypalnikov
          wrote on last edited by
          #8

          Please observe how to include some libraries to the link process :) :

          CC= cl
          #DEFS= -nologo -DSTRICT -G3 -Ow -W3 -Zp -Tp
          DEFS= -nologo -G3
          PROGNAME= foo.exe
          LINKER=link -nologo

          INCLUDES= -I.

          don't define -DSYS_WIN32.. win2k complains

          DEFINES= $(INCLUDES) $(DEFS) -DWINNT=1

          CFLAGS= $(DEFINES)
          GUIFLAGS=user32.lib gdi32.lib winmm.lib comdlg32.lib comctl32.lib
          WINSOCK_LIB=wsock32.lib
          LIBS=$(WINSOCK_LIB) $(GUIFLAGS)
          RC=rc
          RCVARS=-r -DWIN32

          SRCS = foo.c main.c

          OBJS = foo.obj main.obj

          .c.obj:
          $(CC) $(CFLAGS) -c $< -Fo$@

          all: $(PROGNAME)

          $(PROGNAME) : $(OBJS)
          $(LINKER) $(OBJS) /OUT:$(PROGNAME) $(LIBS)

          clean:
          del $(OBJS) $(PROGNAME) core

          virtual void BeHappy() = 0;

          S 1 Reply Last reply
          0
          • E Eugen Podsypalnikov

            Please observe how to include some libraries to the link process :) :

            CC= cl
            #DEFS= -nologo -DSTRICT -G3 -Ow -W3 -Zp -Tp
            DEFS= -nologo -G3
            PROGNAME= foo.exe
            LINKER=link -nologo

            INCLUDES= -I.

            don't define -DSYS_WIN32.. win2k complains

            DEFINES= $(INCLUDES) $(DEFS) -DWINNT=1

            CFLAGS= $(DEFINES)
            GUIFLAGS=user32.lib gdi32.lib winmm.lib comdlg32.lib comctl32.lib
            WINSOCK_LIB=wsock32.lib
            LIBS=$(WINSOCK_LIB) $(GUIFLAGS)
            RC=rc
            RCVARS=-r -DWIN32

            SRCS = foo.c main.c

            OBJS = foo.obj main.obj

            .c.obj:
            $(CC) $(CFLAGS) -c $< -Fo$@

            all: $(PROGNAME)

            $(PROGNAME) : $(OBJS)
            $(LINKER) $(OBJS) /OUT:$(PROGNAME) $(LIBS)

            clean:
            del $(OBJS) $(PROGNAME) core

            virtual void BeHappy() = 0;

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

            ya got it. but in my make file there is not option for including the libraries. well i paste my makefile here.it is still giving the same errors "libgroupsock.lib(Groupsock.obj) : error LNK2001: unresolved external symbol ___security_cookie" INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include ##### Change the following for your environment: # Comment out the following line to produce Makefiles that generate debuggable code: # NODEBUG=1# The following definition ensures that we are properly matching # the WinSock2 library file with the correct header files. # (will link with "ws2_32.lib" and include "winsock2.h" & "Ws2tcpip.h") TARGETOS = WINNT # If for some reason you wish to use WinSock1 instead, uncomment the # following two definitions. # (will link with "wsock32.lib" and include "winsock.h")#TARGETOS = WIN95 #APPVER = 4.0!include <ntwin32.mak> UI_OPTS = $(guilflags) $(guilibsdll) # Use the following to get a console (e.g., for debugging): CONSOLE_UI_OPTS = $(conlflags) $(conlibsdll)CPU=i386 TOOLS32 = C:\Program Files\Microsoft Visual Studio 8\VC COMPILE_OPTS = $(INCLUDES) $(cdebug) $(cflags) $(cvarsdll) -I. -I"$(TOOLS32)\include" C = cC_COMPILER = "$(TOOLS32)\bin\cl"C_FLAGS = $(COMPILE_OPTS)CPP = cpp CPLUSPLUS_COMPILER = $(C_COMPILER)CPLUSPLUS_FLAGS = $(COMPILE_OPTS)OBJ = obj LINK = $(link) -out: LIBRARY_LINK = lib -out: LINK_OPTS_0 = $(linkdebug) msvcrt.libLIBRARY_LINK_OPTS = LINK_OPTS = $(LINK_OPTS_0) $(UI_OPTS) CONSOLE_LINK_OPTS = $(LINK_OPTS_0) $(CONSOLE_UI_OPTS) SERVICE_LINK_OPTS = kernel32.lib advapi32.lib shell32.lib -subsystem:console,$(APPVER) LIB_SUFFIX = libLIBS_FOR_CONSOLE_APPLICATION =LIBS_FOR_GUI_APPLICATION = MULTIMEDIA_LIBS = winmm.libEXE = .exePLATFORM = Windows rc32 = "$(TOOLS32)\bin\rc".rc.res: $(rc32) $<##### End of variables to change MULTICAST_STREAMER_APPS = testMP3Streamer$(EXE) testMPEG1or2VideoStreamer$(EXE) testMPEG1or2AudioVideoStreamer$(EXE) testMPEG2TransportStreamer$(EXE) testMPEG4VideoStreamer$(EXE) testDVVideoStreamer$(EXE) testWAVAudioStreamer$(EXE) testAMRAudioStreamer$(EXE) vobStreamer$(EXE) MULTICAST_RECEIVER_APPS = testMP3Receiver$(EXE) testMPEG1or2VideoReceiver$(EXE) sapWatch$(EXE) MULTICAST_MISC_APPS = testRelay$(EXE) MULTICAST_APPS = $(MULTICAST_STREAMER_APPS) $(MULTICAST_RECEIVER_APPS) $(MULTICAST_MISC_APPS) UNICAST_STREAMER_APPS = testOnDemandRTSPServer$(EXE) testMPEG1or2AudioVideoToDarwin$(EXE) testMPEG4VideoToDarwin$(EX

            E 1 Reply Last reply
            0
            • S sindhumahe

              ya got it. but in my make file there is not option for including the libraries. well i paste my makefile here.it is still giving the same errors "libgroupsock.lib(Groupsock.obj) : error LNK2001: unresolved external symbol ___security_cookie" INCLUDES = -I../UsageEnvironment/include -I../groupsock/include -I../liveMedia/include -I../BasicUsageEnvironment/include ##### Change the following for your environment: # Comment out the following line to produce Makefiles that generate debuggable code: # NODEBUG=1# The following definition ensures that we are properly matching # the WinSock2 library file with the correct header files. # (will link with "ws2_32.lib" and include "winsock2.h" & "Ws2tcpip.h") TARGETOS = WINNT # If for some reason you wish to use WinSock1 instead, uncomment the # following two definitions. # (will link with "wsock32.lib" and include "winsock.h")#TARGETOS = WIN95 #APPVER = 4.0!include <ntwin32.mak> UI_OPTS = $(guilflags) $(guilibsdll) # Use the following to get a console (e.g., for debugging): CONSOLE_UI_OPTS = $(conlflags) $(conlibsdll)CPU=i386 TOOLS32 = C:\Program Files\Microsoft Visual Studio 8\VC COMPILE_OPTS = $(INCLUDES) $(cdebug) $(cflags) $(cvarsdll) -I. -I"$(TOOLS32)\include" C = cC_COMPILER = "$(TOOLS32)\bin\cl"C_FLAGS = $(COMPILE_OPTS)CPP = cpp CPLUSPLUS_COMPILER = $(C_COMPILER)CPLUSPLUS_FLAGS = $(COMPILE_OPTS)OBJ = obj LINK = $(link) -out: LIBRARY_LINK = lib -out: LINK_OPTS_0 = $(linkdebug) msvcrt.libLIBRARY_LINK_OPTS = LINK_OPTS = $(LINK_OPTS_0) $(UI_OPTS) CONSOLE_LINK_OPTS = $(LINK_OPTS_0) $(CONSOLE_UI_OPTS) SERVICE_LINK_OPTS = kernel32.lib advapi32.lib shell32.lib -subsystem:console,$(APPVER) LIB_SUFFIX = libLIBS_FOR_CONSOLE_APPLICATION =LIBS_FOR_GUI_APPLICATION = MULTIMEDIA_LIBS = winmm.libEXE = .exePLATFORM = Windows rc32 = "$(TOOLS32)\bin\rc".rc.res: $(rc32) $<##### End of variables to change MULTICAST_STREAMER_APPS = testMP3Streamer$(EXE) testMPEG1or2VideoStreamer$(EXE) testMPEG1or2AudioVideoStreamer$(EXE) testMPEG2TransportStreamer$(EXE) testMPEG4VideoStreamer$(EXE) testDVVideoStreamer$(EXE) testWAVAudioStreamer$(EXE) testAMRAudioStreamer$(EXE) vobStreamer$(EXE) MULTICAST_RECEIVER_APPS = testMP3Receiver$(EXE) testMPEG1or2VideoReceiver$(EXE) sapWatch$(EXE) MULTICAST_MISC_APPS = testRelay$(EXE) MULTICAST_APPS = $(MULTICAST_STREAMER_APPS) $(MULTICAST_RECEIVER_APPS) $(MULTICAST_MISC_APPS) UNICAST_STREAMER_APPS = testOnDemandRTSPServer$(EXE) testMPEG1or2AudioVideoToDarwin$(EXE) testMPEG4VideoToDarwin$(EX

              E Offline
              E Offline
              Eugen Podsypalnikov
              wrote on last edited by
              #10

              Please try to extent this line : LINK_OPTS_0 = $(linkdebug) msvcrt.lib to :) : LINK_OPTS_0 = $(linkdebug) msvcrt.lib bufferoverflowU.lib

              virtual void BeHappy() = 0;

              S 1 Reply Last reply
              0
              • E Eugen Podsypalnikov

                Please try to extent this line : LINK_OPTS_0 = $(linkdebug) msvcrt.lib to :) : LINK_OPTS_0 = $(linkdebug) msvcrt.lib bufferoverflowU.lib

                virtual void BeHappy() = 0;

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

                hi , thanks for ur patient replies LINK_OPTS_0 = $(linkdebug) msvcrt.lib libBasicUsageEnvironment.lib libgroupsock.lib libliveMedia.lib libUsageEnvironment.lib i have added the libraries like this. now after i compiled , good news is erros got reduced. but new ones have popped in. "LINK : fatal error LNK1181: cannot open input file "libBasicUsageEnvironment.lib"" how to fix this one? can u plz help me ?

                E S 2 Replies Last reply
                0
                • S sindhumahe

                  hi , thanks for ur patient replies LINK_OPTS_0 = $(linkdebug) msvcrt.lib libBasicUsageEnvironment.lib libgroupsock.lib libliveMedia.lib libUsageEnvironment.lib i have added the libraries like this. now after i compiled , good news is erros got reduced. but new ones have popped in. "LINK : fatal error LNK1181: cannot open input file "libBasicUsageEnvironment.lib"" how to fix this one? can u plz help me ?

                  E Offline
                  E Offline
                  Eugen Podsypalnikov
                  wrote on last edited by
                  #12

                  Please try this suggestion firstly :) : LINK_OPTS_0 = $(linkdebug) msvcrt.lib bufferoverflowU.lib

                  virtual void BeHappy() = 0;

                  1 Reply Last reply
                  0
                  • S sindhumahe

                    hi , thanks for ur patient replies LINK_OPTS_0 = $(linkdebug) msvcrt.lib libBasicUsageEnvironment.lib libgroupsock.lib libliveMedia.lib libUsageEnvironment.lib i have added the libraries like this. now after i compiled , good news is erros got reduced. but new ones have popped in. "LINK : fatal error LNK1181: cannot open input file "libBasicUsageEnvironment.lib"" how to fix this one? can u plz help me ?

                    S Offline
                    S Offline
                    sindhumahe
                    wrote on last edited by
                    #13

                    oops sorry buddy. i added the bufferoverflowU.lib and have got the following error. LINK : fatal error LNK1181: cannot open input file "bufferoverflowU.lib"

                    E 1 Reply Last reply
                    0
                    • S sindhumahe

                      oops sorry buddy. i added the bufferoverflowU.lib and have got the following error. LINK : fatal error LNK1181: cannot open input file "bufferoverflowU.lib"

                      E Offline
                      E Offline
                      Eugen Podsypalnikov
                      wrote on last edited by
                      #14

                      OK :) Please try to find the bufferoverflowU.lib file on your (probably C:\ ) harddisk and set it with its full path, please, for a test only. Thanks :)

                      virtual void BeHappy() = 0;

                      S 1 Reply Last reply
                      0
                      • E Eugen Podsypalnikov

                        OK :) Please try to find the bufferoverflowU.lib file on your (probably C:\ ) harddisk and set it with its full path, please, for a test only. Thanks :)

                        virtual void BeHappy() = 0;

                        S Offline
                        S Offline
                        sindhumahe
                        wrote on last edited by
                        #15

                        hi, found the "buffeoverflowU.lib" in c:\ added the path in the library files as well as include files. but now facing new errors( 15 in number :( ) should i add anyother library?kindly help error of type 1: libBasicUsageEnvironment.lib(BasicUsageEnvironment0.obj) : error LNK2001: unresolved external symbol __imp____iob_func error of type 2:libliveMedia.lib(RTCP.obj) : error LNK2001: unresolved external symbol __ftol2_sse error of type 3:libliveMedia.lib(InputFile.obj) : error LNK2001: unresolved external symbol __imp___stat64i32 error of type 4 :libgroupsock.lib(GroupsockHelper.obj) : error LNK2001: unresolved external symbol __imp___ctime64

                        E D S 3 Replies Last reply
                        0
                        • S sindhumahe

                          hi, found the "buffeoverflowU.lib" in c:\ added the path in the library files as well as include files. but now facing new errors( 15 in number :( ) should i add anyother library?kindly help error of type 1: libBasicUsageEnvironment.lib(BasicUsageEnvironment0.obj) : error LNK2001: unresolved external symbol __imp____iob_func error of type 2:libliveMedia.lib(RTCP.obj) : error LNK2001: unresolved external symbol __ftol2_sse error of type 3:libliveMedia.lib(InputFile.obj) : error LNK2001: unresolved external symbol __imp___stat64i32 error of type 4 :libgroupsock.lib(GroupsockHelper.obj) : error LNK2001: unresolved external symbol __imp___ctime64

                          E Offline
                          E Offline
                          Eugen Podsypalnikov
                          wrote on last edited by
                          #16

                          Please try to find and set the libcntpr.lib with its full path too :)

                          virtual void BeHappy() = 0;

                          S 1 Reply Last reply
                          0
                          • E Eugen Podsypalnikov

                            Please try to find and set the libcntpr.lib with its full path too :)

                            virtual void BeHappy() = 0;

                            S Offline
                            S Offline
                            sindhumahe
                            wrote on last edited by
                            #17

                            hey i am not able to find that library.. :(

                            E 1 Reply Last reply
                            0
                            • S sindhumahe

                              hi, i have a .mak file while has four depencies(libraries- libgroupsock.lib, libusageenvironment.lib,libbasicusageenv.lib and liblivemedia.lib) but on building the .mak file , i am facing the following problem. how to resolve this error. if the libraries are to be added , how and where to add them..? kindly help me. libgroupsock.lib(Groupsock.obj) : error LNK2001: unresolved external symbol _security_cookie

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

                              sindhumahe wrote:

                              libgroupsock.lib(Groupsock.obj) : error LNK2001: unresolved external symbol _security_cookie

                              See here, especially the Compiling and Linking Problems section.

                              "One man's wage rise is another man's price increase." - Harold Wilson

                              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                              "Man who follows car will be exhausted." - Confucius

                              1 Reply Last reply
                              0
                              • S sindhumahe

                                hi, found the "buffeoverflowU.lib" in c:\ added the path in the library files as well as include files. but now facing new errors( 15 in number :( ) should i add anyother library?kindly help error of type 1: libBasicUsageEnvironment.lib(BasicUsageEnvironment0.obj) : error LNK2001: unresolved external symbol __imp____iob_func error of type 2:libliveMedia.lib(RTCP.obj) : error LNK2001: unresolved external symbol __ftol2_sse error of type 3:libliveMedia.lib(InputFile.obj) : error LNK2001: unresolved external symbol __imp___stat64i32 error of type 4 :libgroupsock.lib(GroupsockHelper.obj) : error LNK2001: unresolved external symbol __imp___ctime64

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

                                sindhumahe wrote:

                                found the "buffeoverflowU.lib" in c:\

                                Why are there .lib files in the root folder of the C: drive? :wtf:

                                "One man's wage rise is another man's price increase." - Harold Wilson

                                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                                "Man who follows car will be exhausted." - Confucius

                                S 1 Reply Last reply
                                0
                                • S sindhumahe

                                  hi, found the "buffeoverflowU.lib" in c:\ added the path in the library files as well as include files. but now facing new errors( 15 in number :( ) should i add anyother library?kindly help error of type 1: libBasicUsageEnvironment.lib(BasicUsageEnvironment0.obj) : error LNK2001: unresolved external symbol __imp____iob_func error of type 2:libliveMedia.lib(RTCP.obj) : error LNK2001: unresolved external symbol __ftol2_sse error of type 3:libliveMedia.lib(InputFile.obj) : error LNK2001: unresolved external symbol __imp___stat64i32 error of type 4 :libgroupsock.lib(GroupsockHelper.obj) : error LNK2001: unresolved external symbol __imp___ctime64

                                  S Offline
                                  S Offline
                                  sindhumahe
                                  wrote on last edited by
                                  #20

                                  hi , i am not able to find the .lib file which u mentioned. any idea to resolve my problem ? pplz help.:confused:

                                  D 1 Reply Last reply
                                  0
                                  • D David Crow

                                    sindhumahe wrote:

                                    found the "buffeoverflowU.lib" in c:\

                                    Why are there .lib files in the root folder of the C: drive? :wtf:

                                    "One man's wage rise is another man's price increase." - Harold Wilson

                                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                                    "Man who follows car will be exhausted." - Confucius

                                    S Offline
                                    S Offline
                                    sindhumahe
                                    wrote on last edited by
                                    #21

                                    i am sorry. i am not sure about this. can u help me to resolve the error. the link u sent doesnt seem to be of much help.

                                    D 1 Reply Last reply
                                    0
                                    • S sindhumahe

                                      hey i am not able to find that library.. :(

                                      E Offline
                                      E Offline
                                      Eugen Podsypalnikov
                                      wrote on last edited by
                                      #22

                                      Do you compile for x64 ? :) Please remove all additional libs and try to set the only "full pathed" msvcrt.lib from your x64 SDK directory :)

                                      virtual void BeHappy() = 0;

                                      S 1 Reply Last reply
                                      0
                                      • S sindhumahe

                                        i am sorry. i am not sure about this. can u help me to resolve the error. the link u sent doesnt seem to be of much help.

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

                                        What part of "The project is missing a reference to a library (.LIB) or object (.OBJ) file" are you not understanding? Did you read the .lib Files as Linker Input link?

                                        "One man's wage rise is another man's price increase." - Harold Wilson

                                        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                                        "Man who follows car will be exhausted." - Confucius

                                        S 1 Reply Last reply
                                        0
                                        • D David Crow

                                          What part of "The project is missing a reference to a library (.LIB) or object (.OBJ) file" are you not understanding? Did you read the .lib Files as Linker Input link?

                                          "One man's wage rise is another man's price increase." - Harold Wilson

                                          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                                          "Man who follows car will be exhausted." - Confucius

                                          S Offline
                                          S Offline
                                          sindhumahe
                                          wrote on last edited by
                                          #24

                                          hi, i am facing the following trouble. i have included the path of the libraries ad "tools->options->include files libgroupsock.lib(GroupsockHelper.obj) : error LNK2001: unresolved external symbol ___security_cookie like this i am facing the problem with four libraries. can u guide me ?

                                          D 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