Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"unresolved external symbol" error in MSVC++ 6.0

245 views
Skip to first unread message

Rodolphe

unread,
Oct 3, 2003, 5:54:00 AM10/3/03
to
Hello, I'm French so sorry for my approximate English.

When I try to compile a project under Visual C++ 6.0, I've got the
following errors :

applicap.obj : error LNK2001: unresolved external symbol
_IID_ISampleGrabber
applicap.obj : error LNK2001: unresolved external symbol
_CLSID_NullRenderer
applicap.obj : error LNK2001: unresolved external symbol
_CLSID_SampleGrabber
applicap.obj : error LNK2001: unresolved external symbol
_CLSID_SmartTee
applicap.obj : error LNK2001: unresolved external symbol
_CLSID_CaptureGraphBuilder2
applicap.obj : error LNK2001: unresolved external symbol
_IID_ICaptureGraphBuilder2
strmbasd.lib(wxdebug.obj) : error LNK2001: unresolved external symbol
__imp__strrchr
Debug_Unicode/AppliCap.exe : fatal error LNK1120: 7 unresolved
externals

These symbols are part of DirectX, so I've tried to reinstall it, with
no more success. Then I noticed by search that I had to change
"strmbasd.lib" by "strmiids.lib" with this type of error under
DirectX. This corrects the errors above, but new ones appear then :

applicap.obj : error LNK2001: unresolved external symbol "int __cdecl
wsprintfWInternal(unsigned short *,unsigned short const *,...)"
(?wsprintfWInternal@@YAHPAGPBGZZ)
Debug_Unicode/AppliCap.exe : fatal error LNK1120: 1 unresolved
externals

I precise that my project requires DirectX 9 SDK which I reinstalled
several times and that this program works well on another computer
with the same configuration (Windows 2000 Professional, Visual Studio
6.0 ans Directx 9 SDK).
I'm getting mad with this problem because my project doesn't advance,
so I would be very grateful if someone could help me to solve it.

Thanks and sorry for the length of my post.

Kanon Wood

unread,
Oct 3, 2003, 3:07:17 PM10/3/03
to
Explanation of "Unresolved external symbol":
The compiler in Visual Studio (Visual C++) compiles each .cpp file into a
.obj file. The Linker joins the .obj files together to make one .exe file.
This Linker Error states that one of the .obj files references
wsprintfWInternal() in another .obj file, but couldn't find it. (Note: it
may be in a .lib file.)

To fix the problem:
First try this- In the menu, choose Build | Batch Build | Rebuild All.
Sometimes these errors are due to internal problems in Visual Studio. If
this is the case, Rebuild All will fix it.

If the problem persists:
You have to locate wsprintfWInternal() and make sure it is included in your
project. If it's in a .cpp file, make sure that file is part of your
project (It should be listed under "Source Files" in the Workspace.) If the
wsprintfWInternal() is in a library (like DirectX) make sure that you are
linking to the proper .lib.

If it builds on another machine, but not yours, check your .lib files.
Also, make sure that Tools | Options | Directories | Library Files is set up
the same as the other machine (order matters.)

Good luck,
-Kanon

"Rodolphe" <r.l...@free.fr> wrote in message
news:231f9fd6.03100...@posting.google.com...

Rodolphe

unread,
Oct 6, 2003, 8:08:03 AM10/6/03
to
"Kanon Wood" <<none>> wrote in message news:<elXkk$diDHA...@TK2MSFTNGP11.phx.gbl>...

> Explanation of "Unresolved external symbol":
> The compiler in Visual Studio (Visual C++) compiles each .cpp file into a
> .obj file. The Linker joins the .obj files together to make one .exe file.
> This Linker Error states that one of the .obj files references
> wsprintfWInternal() in another .obj file, but couldn't find it. (Note: it
> may be in a .lib file.)

Thanks for this information.


>
> To fix the problem:
> First try this- In the menu, choose Build | Batch Build | Rebuild All.
> Sometimes these errors are due to internal problems in Visual Studio. If
> this is the case, Rebuild All will fix it.

I haved tried it => same problem.


>
> If the problem persists:
> You have to locate wsprintfWInternal() and make sure it is included in your
> project. If it's in a .cpp file, make sure that file is part of your
> project (It should be listed under "Source Files" in the Workspace.) If the
> wsprintfWInternal() is in a library (like DirectX) make sure that you are
> linking to the proper .lib.

In fact it is in files wxutil.h & wxutil.cpp ; when I include wxutil.h
in header files, it makes no changes ; when I include wxutil.cpp in
source files, an other error replace the previous one : "
'COINIT_DISABLE_OLE1DDE' : undeclared identifier ", which is in the
same files. I don't understand why I have this error.

0 new messages