• Advertisement
Sign in to follow this  

Static library, missing obj file

This topic is 3408 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Ive never created a static library before so im stuck with this. I looked into it and I thought it might be to do with static variables within my static library file but no luck. In my project from which i link my library i get the following: 1>LINK : fatal error LNK1104: cannot open file 'Final.obj' Final.obj is a obj file generated when i create the static library. Why would the linker try and reference this in the linkage? Cheers. Ash.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Asheh
Final.obj is a obj file generated when i create the static library. Why would the linker try and reference this in the linkage?

You already know that when you compile a single translation unit (.ccp file, for instance), you generate a single object file. This object file is then linked with other object files and static import libraries to yield your application binary.

When your objective is to create a static import library, however, all your object files are simply archived as one. A static import library is just a collection of object files. The error indicates that something probably went wrong in the building of your static import library, so I'd go back and look at that.

Share this post


Link to post
Share on other sites
I rebuilt everything and there isnt even a Final.obj file. The project and solution is called final year project but thats the only reference to the word final, why would it create an obj file called final?

Pretty stuck with this :-(

Share this post


Link to post
Share on other sites
first, do you have a final.cpp? second, is final.cpp included in your library project?

there should definitely be a final.obj in the debug/release directory of your library project.

Share this post


Link to post
Share on other sites
Quote:

first, do you have a final.cpp? second, is final.cpp included in your library project?

there should definitely be a final.obj in the debug/release directory of your library project.


I know it sounds stupid but there isnt a final.cpp and there isnt in an obj file in the debug/release directory!

Its insane lol.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement