Using leptonica with qt 5.2.0 (vs2012) issues - qt

I'm trying to get the Leptonica 1.68 to work with Qt 5.2.0 (vs2012) static libraries. So i decided to try out the static libraries first, i downloaded the following package leptonica-1.68-win32-lib-include-dirs.zip
And iclude it in my project like so:
LIBS += -L$$PWD\leptonica-1.68-win32-lib-include-dirs\lib -lliblept168-static-mtdll -lgiflib416-static-mtdll
I also use the opencv that i build myself using vc2012+cmake
LIBS += -L$$PWD\opencv\static_libs -llibjpegd -llibpngd -llibtiffd -lIlmImfd -llibjasperd -lopencv_calib3d246d -lopencv_contrib246d -lopencv_core246d -lopencv_features2d246d -lopencv_flann246d -lopencv_gpu246d -lopencv_highgui246d -lopencv_imgproc246d -lopencv_legacy246d -lopencv_ml246d -lopencv_nonfree246d -lopencv_objdetect246d -lopencv_photo246d -lopencv_stitching246d -lopencv_superres246d -lopencv_ts246d -lzlibd
Opencv is built with /MTd and leptonica is built with /MTd too (i assume it from the library name "static-mtdll")
My qt is built with the following configuration:
configure -static -debug-and-release -opensource -confirm-license -platform win
32-msvc2012 -mp -qt-sql-sqlite -plugin-sql-mysql -I C:\MYSQL\include -L C:\QT\lib -c++11 -no-opengl
-nomake tests -nomake examples -no-crt -qt-zlib -qt-libpng -qt-libjpeg
When i'm trying to build my application i get
Qt5Cored.lib(zutil.obj) : error LNK2005: _z_errmsg already defined in zlibd.lib(zutil.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _calloc already defined in LIBCMTD.lib(dbgcalloc.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _fprintf already defined in LIBCMTD.lib(fprintf.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: ___iob_func already defined in LIBCMTD.lib(_file.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _rand already defined in LIBCMTD.lib(rand.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __localtime64 already defined in LIBCMTD.lib(loctim64.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _strchr already defined in LIBCMTD.lib(strchr.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _strstr already defined in LIBCMTD.lib(strstr.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _fseek already defined in LIBCMTD.lib(fseek.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _ftell already defined in LIBCMTD.lib(ftell.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _srand already defined in LIBCMTD.lib(rand.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __snprintf_s already defined in LIBCMTD.lib(sprintf.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _fread already defined in LIBCMTD.lib(fread.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _strrchr already defined in LIBCMTD.lib(strrchr.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _strncmp already defined in LIBCMTD.lib(strncmp.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _sscanf already defined in LIBCMTD.lib(sscanf.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _strftime already defined in LIBCMTD.lib(strftime.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _fopen already defined in LIBCMTD.lib(fopen.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _fwrite already defined in LIBCMTD.lib(fwrite.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _rewind already defined in LIBCMTD.lib(rewind.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _remove already defined in LIBCMTD.lib(unlink.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __lseek already defined in LIBCMTD.lib(lseek.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _fputc already defined in LIBCMTD.lib(fputc.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _fgetc already defined in LIBCMTD.lib(fgetc.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _longjmp already defined in LIBCMTD.lib(longjmp.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _atof already defined in LIBCMTD.lib(atof.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _fgets already defined in LIBCMTD.lib(fgets.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _setvbuf already defined in LIBCMTD.lib(setvbuf.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _strncpy already defined in LIBCMTD.lib(strncpy.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _realloc already defined in LIBCMTD.lib(dbgrealloc.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __isnan already defined in LIBCMTD.lib(ieeemisc.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __fpclass already defined in LIBCMTD.lib(ieeemisc.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _toupper already defined in LIBCMTD.lib(toupper.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __vsnprintf already defined in LIBCMTD.lib(vsnprint.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _vfprintf already defined in LIBCMTD.lib(vfprintf.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _getenv already defined in LIBCMTD.lib(getenv.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __errno already defined in LIBCMTD.lib(dosmap.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __wopen already defined in LIBCMTD.lib(wopen.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _fflush already defined in LIBCMTD.lib(fflush.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _floor already defined in LIBCMTD.lib(floor_pentium4.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _printf already defined in LIBCMTD.lib(printf.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: _strtol already defined in LIBCMTD.lib(strtol.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info##AAE#ABV0##Z) already defined in LIBCMTD.lib(typinfo.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info##AAEAAV0#ABV0##Z) already defined in LIBCMTD.lib(typinfo.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __getpid already defined in LIBCMTD.lib(getpid.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __fileno already defined in LIBCMTD.lib(fileno.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __setmode already defined in LIBCMTD.lib(setmode.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __close already defined in LIBCMTD.lib(close.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __open already defined in LIBCMTD.lib(open.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __read already defined in LIBCMTD.lib(read.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __write already defined in LIBCMTD.lib(write.obj)
MSVCRT.lib(MSVCR110.dll) : error LNK2005: __getcwd already defined in LIBCMTD.lib(getcwd.obj)
LIBCMTD.lib(wfopen.obj) : error LNK2005: __wfopen already defined in MSVCRT.lib(MSVCR110.dll)
Creating library debug\test.lib and object debug\test.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
fatal error LNK1169: one or more multiply defined symbols found
I tried to add /NODEFAULTLIBRARY:MSVCRT.LIB to my pro file but LIBCMTD errors still remain, and i get more warnings like this:
libxml2_a.lib(xmlmemory.obj) : warning LNK4217: locally defined symbol _malloc imported in function _xmlMallocBreakpoint
giflib416-static-mtdll.lib(gifalloc.obj) : warning LNK4049: locally defined symbol _malloc imported
giflib416-static-mtdll.lib(dgif_lib.obj) : warning LNK4217: locally defined symbol _malloc imported in function _DGifCloseFile
libxml2_a.lib(globals.obj) : warning LNK4049: locally defined symbol _malloc imported
libxml2_a.lib(threads.obj) : warning LNK4049: locally defined symbol _malloc imported
liblept168-static-mtdll.lib(pix1.obj) : warning LNK4217: locally defined symbol _malloc imported in function _pix_malloc
liblept168-static-mtdll.lib(jpegio.obj) : warning LNK4049: locally defined symbol _malloc imported
liblept168-static-mtdll.lib(fpix1.obj) : warning LNK4049: locally defined symbol _malloc imported
If i build that project dynamically using non-static qt version and opencv non-static libraries everything works just fine. (i guess that would be /MD). So i assume that leptonica is compiled with /MD and i need to recomplie it with /MTd (static debug). Please help, or maybe provide a faq or solution for building leptonica using vc2012.

Related

Unresolved symbol when building Qt Cmake Project

I was working on a QT program including libtorch and opencv which was compiling without any error in my previous Ubuntu 21.04.
The libtorch library locates at /home/user/Downloads/libtorch and OpenCV installed with the following command:
apt install python3-opencv libopencv-dev libdc1394-22-dev
After upgrading my OS to Ubuntu jammy (22.04), building that program returns the following errors:
warning: libicui18n.so.67, needed by /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3, not found (try using -rpath or -rpath-link)
warning: libicuuc.so.67, needed by /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3, not found (try using -rpath or -rpath-link)
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_getDSTSavings_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_setMillis_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucol_strcoll_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucol_open_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `u_strToUpper_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_getTimeZoneDisplayName_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `uenum_close_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucol_getSortKey_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_get_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_getDefaultTimeZone_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_openTimeZones_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_close_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `u_strToLower_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `uenum_next_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucol_close_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucol_setAttribute_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_inDaylightTime_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_clone_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_open_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_openTimeZoneIDEnumeration_67'
error: /usr/local/Qt-6.2.3/lib/libQt6Core.so.6.2.3: undefined reference to `ucal_openCountryTimeZones_67'
error: collect2: error: ld returned 1 exit status
error: [CMakeFiles/example.dir/build.make:234: bina] Error 1
CMakeLists.txt is as following code:
cmake_minimum_required(VERSION 3.5)
project(example LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_PREFIX_PATH /home/user/Downloads/libtorch)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets LinguistTools REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets LinguistTools REQUIRED)
find_package(Torch REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
set(TS_FILES example_en_US.ts)
set(PROJECT_SOURCES
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
torchtestdlg.cpp
classification.cpp
${TS_FILES}
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(example
${PROJECT_SOURCES}
)
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
else()
if(ANDROID)
add_library(example SHARED
${PROJECT_SOURCES}
)
else()
add_executable(example
${PROJECT_SOURCES}
)
endif()
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
endif()
target_link_libraries(example PRIVATE Qt${QT_VERSION_MAJOR}::Widgets ${TORCH_LIBRARIES} ${OpenCV_LIBS})
Obviously it means that it has unresolved symbols which I couldn't understand what symbols they are.

r - Error: package or namespace load failed for ‘caret’ in namespaceExport(ns, exports): undefined exports: dim_na<-,

I'm getting the following error with the command library(caret) in R:
Error: package or namespace load failed for ‘caret’ in namespaceExport(ns, exports): undefined exports: dim_na<-, as.listenv, get_variable, listenv, map, mapping, parse_env_subset, undim
I'm also getting the following warning:
In addition: Warning message:
S3 methods ‘$.listenv’, ‘$<-.listenv’, ‘[.listenv’, ‘[<-.listenv’, ‘[[.listenv’, ‘[[<-.listenv’, ‘dim<-.listenv’, ‘dimnames<-.listenv’, ‘length<-.listenv’, ‘names<-.listenv’, ‘all.equal.listenv’, ‘as.list.listenv’, ‘as.listenv.default’, ‘as.listenv.environment’, ‘as.listenv.list’, ‘as.listenv.listenv’, ‘as.matrix.listenv’, ‘as.vector.listenv’, ‘dim.listenv’, ‘dimnames.listenv’, ‘get_variable.listenv’, ‘is.array.listenv’, ‘is.matrix.listenv’, ‘length.listenv’, ‘lengths.listenv’, ‘names.listenv’, ‘print.listenv’, ‘undim.default’, ‘undim.listenv’, ‘unlist.listenv’ were declared in NAMESPACE but not found
I've tried removing and reinstalling caret but that did nothing. Any pointers even (like what are the listenv methods) would be helpful. Thanks!

Are custom angular libraries upward compatible?

Is custom angular library developed using 9.1.x upward compatible with version 12.2.0?
I am trying to use library developed using angular 9.1.x in angular project which uses angular 12.2.0
I am getting the below errors:
Error: node_modules/#my-auth/implicit/lib/implicit-flow-provider.d.ts:22:21 - error TS2694: Namespace '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member 'ɵɵFactoryDef'.
22 static ɵfac: i0.ɵɵFactoryDef<ImpFProvider, [null, null, { optional: true; }]>;
~~~~~~~~~~~~
Error: node_modules/#my-auth/implicit/lib/implicit-flow-provider.d.ts:23:22 - error TS2724: '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member named 'ɵɵInjectableDef'. Did you mean 'ɵgetInjectableDef'?
23 static ɵprov: i0.ɵɵInjectableDef<ImpFProvider>;
~~~~~~~~~~~~~~~
Error: node_modules/#my-auth/implicit/lib/implicit-flow-provider.module.d.ts:9:21 - error TS2694: Namespace '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member 'ɵɵNgModuleDefWithMeta'.
9 static ɵmod: i0.ɵɵNgModuleDefWithMeta<ImpFProviderModule, never, [typeof i1.CommonModule, typeof i2.HttpClientModule, typeof i3.AUtilsModule], never>;
~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/b-utils.module.d.ts:5:21 - error TS2694: Namespace '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member 'ɵɵNgModuleDefWithMeta'.
5 static ɵmod: i0.ɵɵNgModuleDefWithMeta<AUtilsModule, never, [typeof i1.CommonModule, typeof i2.HttpClientModule], never>;
~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/services/b-utils-service.d.ts:23:3m21 - error TS2694: Namespace '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member 'ɵɵFactoryDef'.
23 static ɵfac: i0.ɵɵFactoryDef<AUtilsService, never>;
~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/services/b-utils-service.d.ts:24:22 - error TS2724: '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member named 'ɵɵInjectableDef'. Did you mean 'ɵgetInjectableDef'?
24 static ɵprov: i0.ɵɵInjectableDef<AUtilsService>;
~~~~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/services/auth-provider-factory.d.ts:8:21 - error TS2694: Namespace '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member 'ɵɵFactoryDef'.
8 static ɵfac: i0.ɵɵFactoryDef<AuthProFactory, never>;
~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/services/auth-provider-factory.d.ts:9:22 - error TS2724: '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member named 'ɵɵInjectableDef'. Did you mean 'ɵgetInjectableDef'?
9 static ɵprov: i0.ɵɵInjectableDef<AuthProFactory>;
~~~~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/services/b2c-token-builder.service.d.ts:9:21 - error TS2694: Namespace '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member 'ɵɵFactoryDef'.
9 static ɵfac: i0.ɵɵFactoryDef<BTBuilderService, never>;
~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/services/b2c-token-builder.service.d.ts:10:22 - error TS2724: '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member named 'ɵɵInjectableDef'. Did you mean 'ɵgetInjectableDef'?
10 static ɵprov: i0.ɵɵInjectableDef<BTBuilderService>;
~~~~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/services/storage-utils.service.d.ts:9:21 - error TS2694: Namespace '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member 'ɵɵFactoryDef'.
9 static ɵfac: i0.ɵɵFactoryDef<StUtilsService, never>;
~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/services/storage-utils.service.d.ts:10:22 - error TS2724: '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member named 'ɵɵInjectableDef'. Did you mean 'ɵgetInjectableDef'?
10 static ɵprov: i0.ɵɵInjectableDef<StUtilsService>;
~~~~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/types/auth-provider.d.ts:52:21 - error TS2694: Namespace '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member 'ɵɵFactoryDef'.
52 static ɵfac: i0.ɵɵFactoryDef<Auth1Provider, never>;
~~~~~~~~~~~~
Error: node_modules/#my-auth/types/lib/types/auth-provider.d.ts:53:22 - error TS2724: '"C:/Users/admin/myAngularApp2/node_modules/#angular/core/core"' has no exported member named 'ɵɵInjectableDef'. Did you mean 'ɵgetInjectableDef'?

Error installing QtLocation

So I'm trying to install QtLocation.
I created the qt5vars.cmd in C:\QT exactly with the text stated.
This is my error:
C:\QT\QT5>REM Set up \Microsoft Visual Studio 2013, where <arch> is \c
amd64, \c x86, etc.
The syntax of the command is incorrect.
C:\QT\QT5>CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\
vcvarsall.bat" <arch>
C:\QT\QT5>configure -debug -nomake examples -opensource
'configure' is not recognized as an internal or external command,
operable program or batch file.
C:\QT\QT5>
Can anyone point me to the problem? I just installed Microsoft Visual studio and it is located in
C:\Program Files (x86)\Microsoft Visual Studio 12.0
Edit: Found out that the problem was that I needed to add x86, besides only the complete backage consists of the make and configure so therefor I downloaded the complete package.
Now I have a new error
moc_qqmlenginedebugservice_p.cpp
moc_qdebugmessageservice_p.cpp
moc_qv4debugservice_p.cpp
moc_qqmlconfigurabledebugservice_p.cpp
moc_qqmlabstractprofileradapter_p.cpp
moc_qv4profileradapter_p.cpp
moc_qqmlprofiler_p.cpp
moc_qabstractanimationjob_p.cpp
moc_qqmlbind_p.cpp
moc_qqmlconnections_p.cpp
moc_qqmldelegatemodel_p.cpp
moc_qqmldelegatemodel_p_p.cpp
moc_qqmllistmodel_p.cpp
moc_qqmllistmodel_p_p.cpp
moc_qqmllistmodelworkeragent_p.cpp
moc_qqmlobjectmodel_p.cpp
moc_qqmltimer_p.cpp
moc_qquickpackage_p.cpp
moc_qquickworkerscript_p.cpp
Generating Code...
link /NOLOGO /DYNAMICBASE /NXCOMPAT /BASE:0x66000000 /DEBUG /DLL /SUBSYS
TEM:WINDOWS /VERSION:5.40 /MANIFEST:embed /OUT:C:\TUecomotive\QT5\qt-everywhere-
opensource-src-5.4.0\qtbase\lib\Qt5Qmld.dll #C:\Users\s130031\AppData\Local\Temp
\nm9C7.tmp
Creating library C:\TUecomotive\QT5\qt-everywhere-opensource-src-5.4.0\qtbase
\lib\Qt5Qmld.lib and object C:\TUecomotive\QT5\qt-everywhere-opensource-src-5.4.
0\qtbase\lib\Qt5Qmld.exp
YarrInterpreter.obj : error LNK2019: unresolved external symbol "struct JSC::Yar
r::CharacterClass * __cdecl JSC::Yarr::newlineCreate(void)" (?newlineCreate#Yarr
#JSC##YAPAUCharacterClass#12#XZ) referenced in function "public: struct JSC::Yar
r::CharacterClass * __thiscall JSC::Yarr::YarrPattern::newlineCharacterClass(voi
d)" (?newlineCharacterClass#YarrPattern#Yarr#JSC##QAEPAUCharacterClass#23#XZ)
YarrPattern.obj : error LNK2001: unresolved external symbol "struct JSC::Yarr::C
haracterClass * __cdecl JSC::Yarr::newlineCreate(void)" (?newlineCreate#Yarr#JSC
##YAPAUCharacterClass#12#XZ)
YarrInterpreter.obj : error LNK2019: unresolved external symbol "struct JSC::Yar
r::CharacterClass * __cdecl JSC::Yarr::wordcharCreate(void)" (?wordcharCreate#Ya
rr#JSC##YAPAUCharacterClass#12#XZ) referenced in function "public: struct JSC::Y
arr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::wordcharCharacterClass(
void)" (?wordcharCharacterClass#YarrPattern#Yarr#JSC##QAEPAUCharacterClass#23#XZ
)
YarrPattern.obj : error LNK2001: unresolved external symbol "struct JSC::Yarr::C
haracterClass * __cdecl JSC::Yarr::wordcharCreate(void)" (?wordcharCreate#Yarr#J
SC##YAPAUCharacterClass#12#XZ)
YarrPattern.obj : error LNK2019: unresolved external symbol "struct JSC::Yarr::C
haracterClass * __cdecl JSC::Yarr::digitsCreate(void)" (?digitsCreate#Yarr#JSC##
YAPAUCharacterClass#12#XZ) referenced in function "public: struct JSC::Yarr::Cha
racterClass * __thiscall JSC::Yarr::YarrPattern::digitsCharacterClass(void)" (?d
igitsCharacterClass#YarrPattern#Yarr#JSC##QAEPAUCharacterClass#23#XZ)
YarrPattern.obj : error LNK2019: unresolved external symbol "struct JSC::Yarr::C
haracterClass * __cdecl JSC::Yarr::spacesCreate(void)" (?spacesCreate#Yarr#JSC##
YAPAUCharacterClass#12#XZ) referenced in function "public: struct JSC::Yarr::Cha
racterClass * __thiscall JSC::Yarr::YarrPattern::spacesCharacterClass(void)" (?s
pacesCharacterClass#YarrPattern#Yarr#JSC##QAEPAUCharacterClass#23#XZ)
YarrPattern.obj : error LNK2019: unresolved external symbol "struct JSC::Yarr::C
haracterClass * __cdecl JSC::Yarr::nondigitsCreate(void)" (?nondigitsCreate#Yarr
#JSC##YAPAUCharacterClass#12#XZ) referenced in function "public: struct JSC::Yar
r::CharacterClass * __thiscall JSC::Yarr::YarrPattern::nondigitsCharacterClass(v
oid)" (?nondigitsCharacterClass#YarrPattern#Yarr#JSC##QAEPAUCharacterClass#23#XZ
)
YarrPattern.obj : error LNK2019: unresolved external symbol "struct JSC::Yarr::C
haracterClass * __cdecl JSC::Yarr::nonspacesCreate(void)" (?nonspacesCreate#Yarr
#JSC##YAPAUCharacterClass#12#XZ) referenced in function "public: struct JSC::Yar
r::CharacterClass * __thiscall JSC::Yarr::YarrPattern::nonspacesCharacterClass(v
oid)" (?nonspacesCharacterClass#YarrPattern#Yarr#JSC##QAEPAUCharacterClass#23#XZ
)
YarrPattern.obj : error LNK2019: unresolved external symbol "struct JSC::Yarr::C
haracterClass * __cdecl JSC::Yarr::nonwordcharCreate(void)" (?nonwordcharCreate#
Yarr#JSC##YAPAUCharacterClass#12#XZ) referenced in function "public: struct JSC:
:Yarr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::nonwordcharCharacterC
lass(void)" (?nonwordcharCharacterClass#YarrPattern#Yarr#JSC##QAEPAUCharacterCla
ss#23#XZ)
C:\TUecomotive\QT5\qt-everywhere-opensource-src-5.4.0\qtbase\lib\Qt5Qmld.dll : f
atal error LNK1120: 7 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
C:\QT\QT5\qt-everywhere-opensource-src-5.4.0>
I had the same problem. I found the answer here Build Qt 5.4 in windows: use VS2010 and here Unresolved external symbol attempting to build 5.2.
To solve this problem:
Check the file QT_HOME\qtdeclarative\src\qml\RegExpJitTables.h is empty or not. If it is empty, delete it. (In later versions the file is situated in each of the subdirectories of QT_HOME\qtdeclarative\src\qml\.generated\ directory.)
make sure that python is in your PATH
nmake
It works for me.

Statically compiling QWebKit 4.6.2

I tried to compile Qt+Webkit statically with MS VS 2008 and this worked.
C:\Qt\4.6.2>configure -release -static -opensource -no-fast -no-exceptions -no-accessibility -no-rtti -no-stl -no-opengl -no-openvg -no-incredibuild-xge -no-style-plastique -no-style-cleanlooks -no-style-motif -no-style-cde -no-style-windowsce -no-style-windowsmobile -no-style-s60 -no-gif -no-libpng -no-libtiff -no-libjpeg -no-libmng -no-qt3support -no-mmx -no-3dnow -no-sse -no-sse2 -no-iwmmxt -no-openssl -no-dbus -platform win32-msvc2008 -arch windows -no-phonon -no-phonon-backend -no-multimedia -no-audio-backend -no-script -no-scripttools -webkit -no-declarative
However, I get these errors whenever building a project that links statically to QWebKit:
1> Creating library C:\Users\Geeko\Desktop\Qt\TestQ\Release\TestQ.lib and object C:\Users\Geeko\Desktop\Qt\TestQ\Release\TestQ.exp
1>QtWebKit.lib(PluginPackageWin.obj) : error LNK2019: unresolved external symbol _VerQueryValueW#16 referenced in function "class WebCore::String __cdecl WebCore::getVersionInfo(void * const,class WebCore::String const &)" (?getVersionInfo#WebCore##YA?AVString#1#QAXABV21##Z)
1>QtWebKit.lib(PluginPackageWin.obj) : error LNK2019: unresolved external symbol _GetFileVersionInfoW#16 referenced in function "private: bool __thiscall WebCore::PluginPackage::fetchInfo(void)" (?fetchInfo#PluginPackage#WebCore##AAE_NXZ)
1>QtWebKit.lib(PluginPackageWin.obj) : error LNK2019: unresolved external symbol _GetFileVersionInfoSizeW#8 referenced in function "private: bool __thiscall WebCore::PluginPackage::fetchInfo(void)" (?fetchInfo#PluginPackage#WebCore##AAE_NXZ)
1>QtWebKit.lib(PluginDatabaseWin.obj) : error LNK2019: unresolved external symbol _imp_PathRemoveFileSpecW#4 referenced in function "class WebCore::String __cdecl WebCore::safariPluginsDirectory(void)" (?safariPluginsDirectory#WebCore##YA?AVString#1#XZ)
1>QtWebKit.lib(PluginDatabaseWin.obj) : error LNK2019: unresolved external symbol _imp_SHGetValueW#24 referenced in function "void __cdecl WebCore::addWindowsMediaPlayerPluginDirectory(class WTF::Vector &)" (?addWindowsMediaPlayerPluginDirectory#WebCore##YAXAAV?$Vector#VString#WebCore##$0A##WTF###Z)
1>QtWebKit.lib(PluginDatabaseWin.obj) : error LNK2019: unresolved external symbol _imp_PathCombineW#12 referenced in function "void __cdecl WebCore::addMacromediaPluginDirectories(class WTF::Vector &)" (?addMacromediaPluginDirectories#WebCore##YAXAAV?$Vector#VString#WebCore##$0A##WTF###Z)
1>C:\Users\Geeko\Desktop\Qt\TestQ\Release\TestQ.exe : fatal error LNK1120: 6 unresolved externals
Do I need to check something in the Qt project options? I have QtCore, QtGui, Network and WebKit checked.
It looks like you need to link in the windows .lib files for each of the missing functions:
VerQueryValue,GetFileVersionInfo -> version.lib
GetFileVersionInfoSize -> Coredll.lib
PathRemoveFileSpec, SHGetValue, PathCombine -> shlwapi.lib
If you are using qmake, you add:
LIBS += -lversion -lCoredll -lshlwapi
Otherwise: From the Project menu, choose Properties. Open Configuration Properties->Linker->Input. In the Additional Dependencies field, add version.lib, Coredll.lib and shlwapi.lib

Resources