[riot-users] Linking against gtest with RIOT and C++ compiler

Simon Brummer simon.brummer at posteo.de
Tue Feb 14 14:57:14 CET 2017


Okay now I got a different error. It seems my build googletest library 
seems to be incompatible.
Any thoughts?

Thanks in advance.


--- Console Output ---
Building application "riot-cpp-wrapper" for "native" with MCU "native".

"make" -C /home/simon/git-repos/RIOT/boards/native
"make" -C /home/simon/git-repos/RIOT/boards/native/drivers
"make" -C /home/simon/git-repos/RIOT/core
"make" -C /home/simon/git-repos/RIOT/cpu/native
"make" -C /home/simon/git-repos/RIOT/cpu/native/periph
"make" -C /home/simon/git-repos/RIOT/drivers
"make" -C /home/simon/git-repos/RIOT/sys
"make" -C /home/simon/git-repos/RIOT/sys/auto_init
/usr/bin/ld: skipping incompatible ../googletest/libgtest.a when 
searching for -lgtest
/usr/bin/ld: cannot find -lgtest
collect2: Fehler: ld gab 1 als Ende-Status zurück
make: *** 
all] Fehler 1
[simon at archlinux-xfce riot-cpp-wrapper]$

Am 2017-02-14 14:44 schrieb Kaspar Schleiser:
> Hi,
> On 02/14/2017 02:32 PM, Simon Brummer wrote:
>> I am doing some small experiments with C++ under RIOT and I would like
>> to use gtest on native.
>> # External Libs
>> LDFLAGS = -L../googletest
>> LIB_1 = -lpthread
>> LIB_2 = -lgtest
>> LIBS += $(LDFLAGS) $(LIB_1) $(LIB_2)
> Try LINKFLAGS instead of LIBS.
> Kaspar
> _______________________________________________
> users mailing list
> users at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/users

More information about the users mailing list