All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Radek Dostál" <radek.dostal@streamunlimited.com>
To: openembedded-devel@lists.openembedded.org
Subject: Cmake + qt4 = linker error
Date: Tue, 29 Sep 2015 17:09:51 +0200	[thread overview]
Message-ID: <560AA9BF.10703@streamunlimited.com> (raw)
In-Reply-To: <560AA635.30407@streamunlimited.com>

[-- Attachment #1: Type: text/plain, Size: 904 bytes --]

Hi,

I have a very simple (hello world style) program which uses cmake for
compilation and depends on qt4. I am trying to put together bitbake
recipe for this program. See attached.

When compiling it fail with following error:
/tmp/oe-work/sysroots/x86_64-linux/usr/lib/libQtCore.so: file not
recognized: File format not recognized

I suspect it is looking for libraries in native sysroot due to following 
message in log.do_configure: "Found Qt4:
/tmp/oe-work/sysroots/x86_64-linux/usr/bin/qmake2 (found version "4.8.5")"

Obviously it can only find qmake2 binary in the native sysroot and not
in the target sysroot as it does not make any sense to build qmake2 for
target.

I checked meta-openembedded and openembedded-core and could not find any 
  example I could use for inspiration.

1) Is there something I am missing?

2) Is this a known problem?

Thanks,
Radek




[-- Attachment #2: nsdktoolbox.bb --]
[-- Type: text/plain, Size: 139 bytes --]

LICENSE = "CLOSED"

inherit cmake

DEPENDS += "qt4-embedded"

SRC_URI = "\
	file://main.cpp \
	file://CMakeLists.txt \
"

S = "${WORKDIR}"

[-- Attachment #3: CMakeLists.txt --]
[-- Type: text/plain, Size: 504 bytes --]

project(nsdk_toolbox)
cmake_minimum_required(VERSION 2.6)

find_package(Qt4 REQUIRED)

#include(Qt4Macros)

include_directories(${QT_INCLUDES})

set(nsdk_toolbox_SOURCES
	main.cpp
)

set(nsdk_toolbox_HEADERS
)

qt4_wrap_cpp(nsdk_toolbox_MOC ${nsdk_toolbox_HEADERS} OPTIONS -nw)

add_executable(nsdk_toolbox ${nsdk_toolbox_SOURCES} ${nsdk_toolbox_HEADERS} ${nsdk_toolbox_MOC})

target_link_libraries(nsdk_toolbox ${QT_QTCORE_LIBRARY})
install(TARGETS nsdk_toolbox DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)

       reply	other threads:[~2015-09-29 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <560AA635.30407@streamunlimited.com>
2015-09-29 15:09 ` Radek Dostál [this message]
2015-09-29 17:05   ` Cmake + qt4 = linker error Khem Raj
2015-09-30 13:44     ` Radek Dostál

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=560AA9BF.10703@streamunlimited.com \
    --to=radek.dostal@streamunlimited.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.