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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I've been at this for hours, STILL won't compile!

Status
Not open for further replies.

TuxedoTemplar

Programmer
Apr 9, 2003
14
US
Alright I'll TRY to be specific on the problem, but then again I have no clue whats causing it, so I'll start off with the part that has me baffled:

Trigger Happy error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)

I have a whole 2 pages of these in the error list, so first I'd like to ask wtf are they supposed to mean (the program is called Trigger Happy, and I spent the last 3 hours making sure the #include headers were properly constructed, but now I'm at a loss.)

Anyway heres the long version, as best I can tell it: The first part to this was my basic windows app. A menu, some dialog boxes to pop up when clicking on menu options, and some test Open and SaveAs dialog prompts in the "File" menu. This all works. Then I begin the real work on my project, but first I need to import someone else's stuff to work with a certain file type in my project. I checked most of the functions in this person's code to be sure they were properly, then I go about trying to import them into my project. All hell breaks loose. Three hours later of attempting to debug, I have finally got to a point where I'm somewhat certain that the problem does not lie with the #include directives (I'm still not sure about this, but ggiven the time I spent at it I can't see how it would be these anymore).

Short version: I can't get another person's functions and libraries to compile with my project, and I'm stuck until I do. If anyone can help me with this I'd GREATLY appreciate it, but if you need more specifics, then tell me what they are and I'll try to give them. Thanks alot if you do!
 
All right, sorry to double post, but I got a tad further in sleuthing this, so now instead of being generally cluelessly stumped, I'm now specifically cluelessly stumped over what part of a very clearly mentioned &quot;#include <so-and-so>&quot; doesn't register in VS's peebrain compiler. Basically in the code I am trying to import there are 8 function calls to another library called &quot;StormLib&quot; that is located in its own folder in the &quot;Includes&quot; folder as a subfolder of the main &quot;Trigger Happy&quot; project folder (and yes, I have these subfolders defined in the compile directories list all '#include <...>'s, so they SHOULD know where to look for them.) So basically, BEFORE the imported functions make their calls to these functions from StormLib (the ones giving me the &quot;unresolved external symbol&quot; error), there IS the header &quot;#include <StormLib/StormLib.h>&quot; present to supposedly be defining these damn &quot;external symbols&quot;, which of course, it appears it is not.

Anyway I hope this helps to be more specific, and even though I'm not a newbie at programming in general, I haven't had the chance to put my knowledge to practice and thus I ask questions like this, as I simply never learned this stuff in the first place! Thx for taking the time to help if you do, again.
 
Have you either
1:added the stormlib.cpp files to your project.
2:added a reference to stormlib.lib for your linker?
unresolved external means the compiler found the definition in the .h file but not the implementation

WR
 
Hmm, neither, actually. Well I did TRY it, but it still was giving me the same obscure errors so I had concluded that wasn't the problem. Now that I got a bit further though I'll retry it with both and see if that does anything new. Thx for the help, btw.
 
Sorry to dig this thread up from the past. But i have wasted a whole day fighting with a very similar problem.

The project i'm working on in eVC++ 4.0 is using some code for Zipping/Unzipping, it creates 5 object files when compiled. All these files are spat back at me as linker errors:

file.obj : error LNK2001: unresolved external symbol &quot;const type_info::`vftable'&quot; (??_7type_info@@6B@)

I read on the web that it had something to do with RTTI, so i kindof blindly defined _CPPRTTI as a preprocessor def. All hell broke loose and i got over 300 vftable errors. Not even removing the definition helped. I had to delete my entire project structure and get fresh from VSS to get it back to the 5 original errors.

The strange thing about this is that i built the project at 10:00am it was FINE! I then got some updated files from VSS (just a couple source files) and when i rebuilt all i got this. I tried reverting to old code, i've tried reinstalling eVC++ i've tried to light mhyrr and frankinsence to expel demons from my hard disk, but to no avail. I'm starting to suspect the linux box in the corner of the room, its hard disk light is fluttering too often ever since.


Anyway, TuxedoTemplar, or anyone else, have you been able to resolve this problem? Any help would be greatly appreciated.
 
Check that your system still has all the correct directories for your include files. And I'd guess that you did't do a clean rebuild after you enabled _CPPRTTI, so that was why the system was still struggling ?

K
 
Hey kalisto.

Yes, all the correct directories are there. I have checked and double checked my libraries and DLLs. Every time i build i did a 'rebuild all' (just to be sure).

some more detailed info. The 5 objects that get this linker error are all part of a DLL. They have some old remnant Try/Catch stuff, which i believe is the cause of all this, but it doesn't explain why it's been working fine for over a year, and all of a sudden starts choking. I did try to remove the try/catch statements from the code in one of the source files, and it DID rid the linker error. However the rest of the files are about 10-20klocs with a lot of try/catch in them. And as i said before, all this works great on my coworkers machines.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top