<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18882">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>I am new to cmake and QT so I thought I'd build a
test project (basic forms app with two source files) in QTCreator and
use CMake to port it to VS2008 to test it out. I have tried to pick
the commands I need for the CMakefiles from the documentation. The cmake
configure and generate went okay, but when I tried to build in
VS, I got linker errors so I added the command to link the QT libraries (built
with VS2008) and most of them disappeared apart from 3, I'm not sure what it's
looking for now - can anyone help? here is my makefile and VS
errors:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>project(hello)<BR>IF(NOT UNIX AND NOT
MINGW)<BR> SET(MITK_WIN32_FORCE_STATIC "STATIC" CACHE INTERNAL "Use this
variable to always build static libraries on non-unix </FONT><FONT size=2
face=Arial>platforms")<BR>ENDIF()<BR>find_package(Qt4 4.5.2 COMPONENTS QtCore
QtGui QtXml REQUIRED )<BR>include(${QT_USE_FILE})<BR>QT4_AUTOMOC(main.cpp
mainwindow.cpp)<BR>add_library(LIB main.cpp)<BR>include_directories
(${HELLO_SOURCE_DIR})<BR>link_directories(${HELLO_SOURCE_DIR})<BR>set(SRC main.cpp<BR> mainwindow.cpp)<BR>add_executable(hello
${SRC}) <BR>target_link_libraries(hello
${QT_LIBRARIES}) </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>VS Errors</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Error 1 error LNK2001: unresolved
external symbol "public: virtual struct QMetaObject const * __thiscall
MainWindow::metaObject(void)const " (<A
href="mailto:?metaObject@MainWindow@@UBEPBUQMetaObject@@XZ">?metaObject@MainWindow@@UBEPBUQMetaObject@@XZ</A>) mainwindow.obj hello<BR></FONT></DIV>
<DIV><FONT size=2 face=Arial>Error 2 error LNK2001: unresolved
external symbol "public: virtual void * __thiscall MainWindow::qt_metacast(char
const *)" (<A
href="mailto:?qt_metacast@MainWindow@@UAEPAXPBD@Z">?qt_metacast@MainWindow@@UAEPAXPBD@Z</A>) mainwindow.obj hello<BR></FONT></DIV>
<DIV><FONT size=2 face=Arial>Error 3 error LNK2001: unresolved
external symbol "public: virtual int __thiscall MainWindow::qt_metacall(enum
QMetaObject::Call,int,void * *)" (<A
href="mailto:?qt_metacall@MainWindow@@UAEHW4Call@QMetaObject@@HPAPAX@Z">?qt_metacall@MainWindow@@UAEHW4Call@QMetaObject@@HPAPAX@Z</A>) mainwindow.obj hello<BR></DIV></FONT>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV></BODY></HTML>