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. LNK1107

LNK1107

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcsharpquestion
6 Posts 3 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.
  • M Offline
    M Offline
    MozhdehQeraati
    wrote on last edited by
    #1

    Hi everybody I am writing a dll in C++.Net. I had a .h and .cpp file in visual C6.0 and I want to use it here,but there is no lib. First, I set the paths in project properties, but because there is no lib file, I only set the .h file path there. But while compiling there were two LNK errors: LNK2028 and LNK2019. I add it manually in the "Header files" section and "Source Files" section. But there is an error like this while compiling: LNK1107: Invalid or corrupt file, cannot read at 0x306 I also include it in my code. What's wrong? Would you please help me? Thanks in advance

    C S 2 Replies Last reply
    0
    • M MozhdehQeraati

      Hi everybody I am writing a dll in C++.Net. I had a .h and .cpp file in visual C6.0 and I want to use it here,but there is no lib. First, I set the paths in project properties, but because there is no lib file, I only set the .h file path there. But while compiling there were two LNK errors: LNK2028 and LNK2019. I add it manually in the "Header files" section and "Source Files" section. But there is an error like this while compiling: LNK1107: Invalid or corrupt file, cannot read at 0x306 I also include it in my code. What's wrong? Would you please help me? Thanks in advance

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      Did you add the cpp file to the project? I don't mean the paths to folders where the cpp or header is sitting, i mean the file itself? If not, could it be that the unresolved symbols are defined in that cpp?

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

      M 1 Reply Last reply
      0
      • M MozhdehQeraati

        Hi everybody I am writing a dll in C++.Net. I had a .h and .cpp file in visual C6.0 and I want to use it here,but there is no lib. First, I set the paths in project properties, but because there is no lib file, I only set the .h file path there. But while compiling there were two LNK errors: LNK2028 and LNK2019. I add it manually in the "Header files" section and "Source Files" section. But there is an error like this while compiling: LNK1107: Invalid or corrupt file, cannot read at 0x306 I also include it in my code. What's wrong? Would you please help me? Thanks in advance

        S Offline
        S Offline
        Stuart Dootson
        wrote on last edited by
        #3

        Sounds to me like you're linking against something that claims to be a .lib or .obj file, but isn't - could that be the header file? I think you actually want to be adding the .h and .cpp files to your project and building them into it.\, from your question.

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        M 1 Reply Last reply
        0
        • C Code o mat

          Did you add the cpp file to the project? I don't mean the paths to folders where the cpp or header is sitting, i mean the file itself? If not, could it be that the unresolved symbols are defined in that cpp?

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

          M Offline
          M Offline
          MozhdehQeraati
          wrote on last edited by
          #4

          of course I did. I added both the .h and the .cpp file in the solution explorer.

          1 Reply Last reply
          0
          • S Stuart Dootson

            Sounds to me like you're linking against something that claims to be a .lib or .obj file, but isn't - could that be the header file? I think you actually want to be adding the .h and .cpp files to your project and building them into it.\, from your question.

            Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

            M Offline
            M Offline
            MozhdehQeraati
            wrote on last edited by
            #5

            I did it. I added the .h and .cpp file in the solution explorer and build the project. but it doesn't work.

            S 1 Reply Last reply
            0
            • M MozhdehQeraati

              I did it. I added the .h and .cpp file in the solution explorer and build the project. but it doesn't work.

              S Offline
              S Offline
              Stuart Dootson
              wrote on last edited by
              #6

              MozhdehQeraati wrote:

              doesn't work

              'Doesn't work' encapsulates sooo many ba things...

              Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

              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