Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fatal error LNK1136: invalid or corrupt file

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hey there, I'm getting messages like this

fatal error LNK1136: invalid or corrupt file

When trying to create a DLL in Visual C++ 6.0. Its complaining about .h files I'm including and if I don't include them I get unresolved symbol messages. Is there a special way to include files when creating DLLs? If not is there some setting I'm missing?
 
You chould shut down the program what loaded the dll before linking. While dll is loaded in memory, you can't edit/write it while linking. John Fill
1c.bmp


ivfmd@mail.md
 
It is a dll I'm creating, how can it be loaded into memory, it doesn't even exist yet
 
Have you succesfully compiled it once? Have you try to debug it? There exists many ways it to stay in memory with doing something or nothing. John Fill
1c.bmp


ivfmd@mail.md
 
In this case, maybe some cpp libraries are corruped. You must change them. LookUp which one is corruped and changhe. You could accidentally delete one of them or it could been since instalation of VisualStudio. John Fill
1c.bmp


ivfmd@mail.md
 
Like JohnFill said, sometimes, for inexplicable reasons, some of the standard header files will get corrupted. I've had to reload a header from the CD more than once because it got badly mangled.
 
So you guys don't think this is a dll creation specific problem?
 
In the header file is corrupt you will get compiller message. Simply it will not compille. Linker errors are because of linking compilled files to exe,lib,dll,ocx...
The compiled files are usualy obj's. Try to see which obj or lib the linker can't link to your dll. John Fill
1c.bmp


ivfmd@mail.md
 
When I've had problems with corrupt header files, I opened them up and saw a ton of garbage - they didn't even look like header files.
 
Once I have accedently put my.dll instead of my.lib in the line of libraries to link with my programm and I have this error.
Be sure you did not make this mistake.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top