Hi,
I tried to add a few .cpp files to Makefile but it seems that L4Re build systems ignores this extension.
This is the content of the Makefile: #################################### PKGDIR ?= ../.. L4DIR ?= $(PKGDIR)/../..
TARGET = test_cpp SRC_CC = main.cpp class1.cpp class2.cpp
REQUIRES_LIBS = libstdc++
include $(L4DIR)/mk/prog.mk ####################################
I tried to replace SRC_CC with SRC_CXX or SRC_CPP but with no luck ...
This bug prevents the port of most of C++ libs out there to L4Re.
BTW, is there any chance to use other build-systems (cmake, qbs, premake, SCons, etc.) to build L4Re libs/apps ?
Cheers, BogDan.
I tried to add a few .cpp files to Makefile but it seems that L4Re build
systems ignores this extension.
Not exactly. The build system considers .cpp as preprocessed C files. Please use .cc as extension for C++ code.
Then how do I port libs like Qt to L4Re? Qt uses .cpp extension for C++ code ... I can not rename all Qt .cpp file to .cc :)
Is there any way to make the build system to considers .cpp extension as C++ code as well ?
Thanks.
Cheers, BogDan.
Is there any way to make the build system to considers .cpp extension as
C++
code as well ?
Just looking at the build system code in l4/mk/binary.inc -> Adding
BID_ALLOW_CPP_AS_CPLUSPLUS_FILE=y
to your Makefile should let you put .cpp files in SRC_CC.
Many thanks it worked !
BogDan.
I tried to add a few .cpp files to Makefile but it seems that L4Re build
systems ignores this extension.
Not exactly. The build system considers .cpp as preprocessed C files. Please use .cc as extension for C++ code.
Then how do I port libs like Qt to L4Re? Qt uses .cpp extension for C++ code ... I can not rename all Qt .cpp file to .cc :)
Is there any way to make the build system to considers .cpp extension as C++ code as well ?
You can add
BID_ALLOW_CPP_AS_CPLUSPLUS_FILE = y
to your Makefile to make BID recognize CPP files as c plus plus code.
- Marcus
l4-hackers@os.inf.tu-dresden.de