I have generated an image for my VU+ Solo2 after following the instructions on the following URL: http://blog.videgro.net/2013/05/how-to-compile-software-for-vu-plus/.
This works OK if I use standard C-code (as in the example in the URL), but when I try to compile C++-code I get errors which seems to originate from using the gcc-compiler instead of the g++-compiler.
The variable CC tells which compiler to use, but I have no clue where and how I could change this.
My .bb-recipe is as follows:
DESCRIPTION = "dcp - Directory CoPy"
PR = "r0"
LICENSE = "TEST LICENSE"
LIC_FILES_CHKSUM = "file:///home/<username>/openvuplus/meta-openvuplus/recipes-extended/dcp/LICENSE;md5=d41d8cd98f00b204e9800998ecf8427e"
SRC_URI = "file://dcp.cpp \
file://README.txt
do_compile() {
${CC} ${CFLAGS} ${LDFLAGS} ${WORKDIR}/dcp.cpp -o dcp
}
do_install() {
install -m 0755 -d ${D}${bindir} ${D}${docdir}/dcp
install -m 0755 ${S}/dcp ${D}${bindir}
install -m 0644 ${WORKDIR}/README.txt ${D}${docdir}/dcp
}
My program uses multithreading (the pthread-library). Do I have to specify some special loader options for to tell the g++-compiler/loader to load that library ? And how do I do that ?
In this example I have put all the header-files and source-files together into one file (dcp.cpp). But how do I specify it if I want to use more than one source-file and one or two user-defined header files ? Could I just specify each file in the SRC_URI-section of the .bb-file ?
Sorry for my questions, but I'm a complete newbie on these matters. And I have searched through the net to try to find the solution, but all examples and docs seems to focus on a simple recipe with a simple C-routine. So I'm stuck..
Any help would be appreciated.