Project

General

Profile

Problem linking Wt on Windows7 VS2010 with shared libs

Added by Ronald Peer almost 13 years ago

I'm trying to build Wt on Windows 7, Visual Studio 2010. I have turned SHARED_LIBS=ON, so libs and dll's are built.

When compiling and linking the example projects I get the following link error:

Error 7 error LNK2001: unresolved external symbol "struct Wt::WtLibVersion const Wt::WtWT_VERSION" (?WtWT_VERSIONWt@3UWtLibVersion1B) D:\uSuCoCommon\Wt\BUILDX\examples\hello\hello.obj hello.wt

Error 8 error LNK1120: 1 unresolved externals D:\uSuCoCommon\Wt\BUILDX\examples\hello\Debug\hello.wt.exe 1 1 hello.wt

What could I be missing here, or is this a bug?

Ronald Peer


Replies (3)

RE: Problem linking Wt on Windows7 VS2010 with shared libs - Added by Wim Dumon almost 13 years ago

Ronald,

There's an explicit check in Wt that tries to detect whether the Wt version you're compiling is consistent with the one you're linking against. Look for WT_INCLUDED_VERSION in WApplication and WApplication.C to see how this works.

Apparently, in compiling your example, WT_VERSION is not properly defined. I've never ran into a situation where this happens; are you compiling Wt in a special way? Is your WConfig.h correctly generated (it should be in build/Wt/WConfig.h)?

BR,

Wim.

RE: Problem linking Wt on Windows7 VS2010 with shared libs - Added by Ronald Peer almost 13 years ago

It seems the problem has solved itself.

I've extracted the sources again, and all compiles, links and runs correctly again.

Also our own (real) project file compiles, links and runs.

Somewhere down the process some file must have become corrupted/damaged I guess.

Thanks for the help, my excuses for the false alarm.

Ronald

RE: Problem linking Wt on Windows7 VS2010 with shared libs - Added by Anon Anon over 11 years ago

I'm also on Win7 and was getting this same error (unresolved external symbol "struct Wt::WtLibVersion const Wt::WtWT_VERSION") while trying to set up a minimal WT application in MSVS Express 2013. I managed to resolve it by manually adding "WIN32" to the "Preprocessor Definitions" under Configuration Properties > C/C > Preprocessor.

    (1-3/3)