Linking error while building automoc4 - windows

I have installed KDE libs. And I am trying to compile kcachegrind. However this error message appears:
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Did not find automoc4 (Automoc4Config.cmake, install
git://anongit.kde.org/automoc). (missing: AUTOMOC4_EXECUTABLE)
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
C:/ProgramData/KDE/share/apps/cmake/modules/FindAutomoc4.cmake:49 (find_package_handle_standard_args)
C:/ProgramData/KDE/share/apps/cmake/modules/FindKDE4Internal.cmake:423 (find_package)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindKDE4.cmake:95 (find_package)
CMakeLists.txt:5 (find_package)
I found this post. It seems that he has the same problem. And I download automoc4-0.9.88 from this link, generate the make file with cmake, and try to compile it with MinGW. However, I get this following error messages:
): undefined reference to `__imp__Z4endlR11QTextStream'
CMakeFiles\automoc4.dir/objects.a(kde4automoc.obj):kde4automoc.cpp:(.text+0x6b2d
): undefined reference to `__imp__ZN5QFile6removeERK7QString'
CMakeFiles\automoc4.dir/objects.a(kde4automoc.obj):kde4automoc.cpp:(.text+0x6b54
): undefined reference to `__imp__ZNK9QIODevice11errorStringEv'
CMakeFiles\automoc4.dir/objects.a(kde4automoc.obj):kde4automoc.cpp:(.text+0x6b79
): undefined reference to `__imp__ZN11QTextStreamlsEPKc'
CMakeFiles\automoc4.dir/objects.a(kde4automoc.obj):kde4automoc.cpp:(.text+0x6b90
): undefined reference to `__imp__ZN11QTextStreamlsERK7QString'
CMakeFiles\automoc4.dir/objects.a(kde4automoc.obj):kde4automoc.cpp:(.text+0x6ba3
): undefined reference to `__imp__ZN11QTextStreamlsEPKc'
What are these about? Can anybody help please?

Looks like some Qt components are missing in the list of the libraries being linked to your program. Try to invoke make VERBOSE=1 and copy-paste here the exact linker invocation line.

Related

cmake-gui, What is ZLIB_INCLUDE_DIR error?

I want built OBS with cmake-gui. but "confirgure" is print error.
CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Libx264 (missing: X264_LIB X264_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindLibx264.cmake:62 (find_package_handle_standard_args)
plugins/obs-x264/CMakeLists.txt:3 (find_package)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZLIB_INCLUDE_DIR (ADVANCED)
used as include directory in directory C:/Users/LHS/Documents/obs/obs-studio/libobs
used as include directory in directory C:/Users/LHS/Documents/obs/obs-studio/libobs
used as include directory in directory C:/Users/LHS/Documents/obs/obs-studio/libobs
How do i do?

CMake can't find Freetype

I'm trying to setup Freetype in my CMakeLists.txt file. (CMake 3.13)
cmake_policy(SET CMP0074 NEW)
find_package(Freetype REQUIRED)
But I got the error message:
[cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
[cmake] Could NOT find Freetype (missing: FREETYPE_LIBRARY) (found version "2.5.5")
[cmake] Call Stack (most recent call first):
[cmake] C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
[cmake] C:/Program Files/CMake/share/cmake-3.13/Modules/FindFreetype.cmake:156 (find_package_handle_standard_args)
[cmake] CMakeLists.txt:18 (find_package)
I opened the file of FindFreetype.cmake, it says:
The user may set the environment variable FREETYPE_DIR to the root
directory of a Freetype installation.
so I did.My FREETYPE_DIR is set to MY FOLDER OF\freetype\include, the folder looks like this:
freetype folder
but I got the same error, no difference. (I have quit all cmd windows and my VSCode)
I also set the FREETYPE_ROOT to the same folder, just in case.
So which environment variable should I set?
Do I need to compile the Freetype project? (I only downloaded the source code but have not compiled)

How to use FindGDAL on Windows?

Our program needs gdal, so we got it, and compiled it using their directions. As such, C:\warmerda\bld\include has .h files, C:\warmerda\bld\lib has gdal.lib and gdal_i.lib, and so on.
I have this in my CMakeLists.txt:
set(GDAL_DIR C:/warmerda/bld)
find_package(GDAL REQUIRED)
However, when I run cmake, all I get is this:
$ cmake . -G"Visual Studio 14 2015 Win64"
-- Boost version: 1.59.0
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find GDAL (missing: GDAL_LIBRARY GDAL_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindGDAL.cmake:116 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
main/CMakeLists.txt:31 (find_package)

cmake cannot find the version of boost 1.59

I want to setup CGAL-4.7 and, in order to do that, i need to install boost. Specifically, i use boost-1.59. Cmake version is 3.4.0. I get the following message:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindBoost.cmake:1247 (message):
Unable to find the requested Boost libraries.
Boost version: 0.0.0
Boost include path: C:/local/boost_1_59_0/boost
Detected version of Boost is too old. Requested version was 1.39 (or
newer).
Call Stack (most recent call first):
cmake/modules/CGAL_SetupBoost.cmake:6 (find_package)
cmake/modules/CGAL_SetupDependencies.cmake:85 (include)
CMakeLists.txt:649 (include)
EDIT
The main error is this:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindBoost.cmake:721
(file): file STRINGS file "C:/local/boost_1_59_0/boost/boost/version.hpp" cannot be read. Call Stack (most recent call first): cmake/modules/CGAL_SetupBoost.cmake:6
(find_package) cmake/modules/CGAL_SetupDependencies.cmake:85(include)
CMakeLists.txt:649 (include)
What could be the problem?

Using boost: __func_Grm00gZzHB Function invoked with incorrect arguments

I have a problem to use boost with biicode. I have a simple project with a main. The project uses boost. In order to get boost with biicode I used the following cmake file:
include(biicode/boost/setup)
ADD_BII_TARGETS()
bii_find_boost(COMPONENTS unit_test_framework REQUIRED)
target_include_directories(${BII_BLOCK_TARGET} INTERFACE ${Boost_INCLUDE_DIRS})
target_link_libraries(${BII_BLOCK_TARGET} INTERFACE ${Boost_LIBRARIES})
If I now call "bii configure", boost is downloaded and extracted (i checked the .biicode/boost folder). Nevertheless I get some weired errors (A trace version can be found here) and the configuration process fails:
$ bii configure --verbose
DEBUG: Everything up to date
DEBUG: No valid files found in d:\C++\Workspace\testx\blocks
INFO: Processing changes...
Running: "cmake" -G "Visual Studio 12" -Wno-dev ..\cmake
BLOCK: user/testx
-----------------------------------------------------------
CMake Error at C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:1 (__func_1111111111):
__func_1111111111 Function invoked with incorrect arguments for function
named: __func_1111111111
Call Stack (most recent call first):
C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:4 (include)
../deps/toeb/cmakepp/cmake/task/task_run_next.cmake:34 (eval)
../deps/toeb/cmakepp/cmake/task/task_run_next.cmake:42 (task_run_next)
../deps/toeb/cmakepp/cmake/task/task_run_all.cmake:6 (task_run_next)
../deps/toeb/cmakepp/cmakepp.cmake:110 (task_run_all)
../deps/boost/install/build_jobs.cmake:1 (include)
../deps/boost/install/install.cmake:2 (include)
../deps/biicode/boost/setup.cmake:1 (include)
../../CMakeLists.txt:1 (include)
CMake Error at C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:1 (__func_6oohAf7Azh):
__func_6oohAf7Azh Function invoked with incorrect arguments for function
named: __func_6oohAf7Azh
Call Stack (most recent call first):
C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:4 (include)
../deps/toeb/cmakepp/cmake/task/task_run_next.cmake:34 (eval)
../deps/toeb/cmakepp/cmake/task/task_run_all.cmake:6 (task_run_next)
../deps/toeb/cmakepp/cmakepp.cmake:110 (task_run_all)
../deps/boost/install/build_jobs.cmake:1 (include)
../deps/boost/install/install.cmake:2 (include)
../deps/biicode/boost/setup.cmake:1 (include)
../../CMakeLists.txt:1 (include)
CMake Error at C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:1 (__func_F9SWokvms4):
__func_F9SWokvms4 Function invoked with incorrect arguments for function
named: __func_F9SWokvms4
Call Stack (most recent call first):
C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:4 (include)
../deps/toeb/cmakepp/cmake/task/task_run_next.cmake:34 (eval)
../deps/toeb/cmakepp/cmake/task/task_run_all.cmake:6 (task_run_next)
../deps/toeb/cmakepp/cmakepp.cmake:110 (task_run_all)
../deps/boost/install/build_jobs.cmake:1 (include)
../deps/boost/install/install.cmake:2 (include)
../deps/biicode/boost/setup.cmake:1 (include)
../../CMakeLists.txt:1 (include)
CMake Error at C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:1 (__func_Grm00gZzHB):
__func_Grm00gZzHB Function invoked with incorrect arguments for function
named: __func_Grm00gZzHB
Call Stack (most recent call first):
C:/Users/Tobi/AppData/Local/Temp/file_make_temporary_m6QEuq5c7B.tmp:4 (include)
../deps/toeb/cmakepp/cmake/task/task_run_next.cmake:34 (eval)
../deps/toeb/cmakepp/cmake/task/task_run_all.cmake:6 (task_run_next)
../deps/toeb/cmakepp/cmakepp.cmake:110 (task_run_all)
../deps/boost/install/build_jobs.cmake:1 (include)
../deps/boost/install/install.cmake:2 (include)
../deps/biicode/boost/setup.cmake:1 (include)
../../CMakeLists.txt:1 (include)
+ LIB: user_testx
+ EXE: user_testx___main
-- No linking type specified. Assuming static linking
-- Setting up biicode Boost configuration...
-- Building Boost 1.57.0 components with toolset msvc-12.0...
Starting unit_test_framework library build job...
Building Boost components, please wait [ ]
Finished building unit_test_framework library
-- Boost version: 1.57.0
-- Boost version: 1.57.0
-- Found the following Boost libraries:
-- unit_test_framework
-- Configuring incomplete, errors occurred!
See also "D:/C++/Workspace/testx/bii/build/CMakeFiles/CMakeOutput.log".
ERROR: CMake failed
Ok I failed to figure out what the problem was, but i fixed it^^. The problem was something with a binary symbol RS (E1 (hex) in ascii) which was placed in some source files of https://github.com/toeb/cmakepp (must be a cmake problem, because after removing them they appeared again after executing cmake).
The problem disappeared after updating cmake from version 3.1.0-rc1 -> 3.3.0-rc3.

Resources