Turbo C++ question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Samael
    New Member
    • Feb 2008
    • 4

    Turbo C++ question

    I'm trying to compile a program in Turbo C++ and i get a [Linker Error], well several.

    The exact error is "Unresolved External ... referenced from where ever the file is. The file OBJ file is there and i can't figure out why its giving me the error. If anyone has any idea that'd be great. Thanks
  • Laharl
    Recognized Expert Contributor
    • Sep 2007
    • 849

    #2
    Did you remember to #include the file?

    Comment

    • Samael
      New Member
      • Feb 2008
      • 4

      #3
      Hhmm, just wondering what is the proper way to include an object file in the C++ code?

      Comment

      • Samael
        New Member
        • Feb 2008
        • 4

        #4
        To be perfectly clear it's telling me theres a linker error for an obj file and a lib file.

        Comment

        • Laharl
          Recognized Expert Contributor
          • Sep 2007
          • 849

          #5
          For a system library (pre-provided), use #include <filename>. For a file you provide in the same directory, use #include "filename". The <> do not require the .h ending, the "" do. If your definition and implementation are in different files, the linker should connect them and bring both in.

          Comment

          • weaknessforcats
            Recognized Expert Expert
            • Mar 2007
            • 9214

            #6
            This error has nothing to do with a #include.

            What it has to do with is that you are calling a function that the linker can't find in any of the files or any of the libariers in the build.

            This error is often a mismatch between the function prototype in the included header and the function definition itself.

            Comment

            Working...