Skip to content

Can't build the test application #30

@rnestler

Description

@rnestler

When trying to build the test application I get the following error:

% make
Compilation de src/JoystickAdaptor.cpp
g++ -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -lreadline -lncurses -lmenu -lsphero -c -pthread -g -o obj/JoystickAdaptor.o src/JoystickAdaptor.cpp
src/JoystickAdaptor.cpp:12:13: warning: declaration of 'std::ifstream* threadInit::ifstream' [-fpermissive]
   ifstream* ifstream;
             ^
In file included from /usr/include/c++/5.3.0/ios:38:0,
                 from /usr/include/c++/5.3.0/istream:38,
                 from /usr/include/c++/5.3.0/fstream:38,
                 from src/JoystickAdaptor.cpp:2:
/usr/include/c++/5.3.0/iosfwd:162:34: warning: changes meaning of 'ifstream' from 'typedef class std::basic_ifstream<char> std::ifstream' [-fpermissive]
   typedef basic_ifstream<char>   ifstream;
                                  ^
src/JoystickAdaptor.cpp: In static member function 'static JoystickEvent JoystickAdaptor::interpret(int*)':
src/JoystickAdaptor.cpp:157:30: warning: invalid conversion from 'int' to 'eventBtn' [-fpermissive]
     ev.buttonType = BUTTON_0 + data[3];
                              ^
src/CommandHandler.cpp:22:44: fatal error: sphero/bluetooth/bluez_adaptor.h: No such file or directory
compilation terminated.
cp: cannot stat 'dep/CommandHandler.d': No such file or directory
/bin/sh: line 2: dep/CommandHandler.d: No such file or directory
sed: can't read dep/CommandHandler.P: No such file or directory
makefile:74: recipe for target 'obj/CommandHandler.o' failed
make: *** [obj/CommandHandler.o] Error 2

Am I doing something wrong? There is a bluez_adaptor.h in src/bluetooth, also I previously built the library with success:

% make
Compilation de src/Sphero.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/Sphero.o src/Sphero.cpp
Compilation de src/bluetooth/bluez_adaptor.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/bluetooth/bluez_adaptor.o src/bluetooth/bluez_adaptor.cpp
Compilation de src/packets/SpheroAsyncPacket.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/SpheroAsyncPacket.o src/packets/SpheroAsyncPacket.cpp
Compilation de src/packets/ChecksumComputer.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/ChecksumComputer.o src/packets/ChecksumComputer.cpp
Compilation de src/packets/Toolbox.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/Toolbox.o src/packets/Toolbox.cpp
Compilation de src/packets/async/CollisionStruct.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/async/CollisionStruct.o src/packets/async/CollisionStruct.cpp
Compilation de src/packets/async/SpheroCollisionPacket.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/async/SpheroCollisionPacket.o src/packets/async/SpheroCollisionPacket.cpp
Compilation de src/packets/async/SpheroStreamingPacket.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/async/SpheroStreamingPacket.o src/packets/async/SpheroStreamingPacket.cpp
Compilation de src/packets/async/DataBuffer.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/async/DataBuffer.o src/packets/async/DataBuffer.cpp
Compilation de src/packets/async/SpheroSimpleStreamingPacket.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/async/SpheroSimpleStreamingPacket.o src/packets/async/SpheroSimpleStreamingPacket.cpp
Compilation de src/packets/SpheroAnswerPacket.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/SpheroAnswerPacket.o src/packets/SpheroAnswerPacket.cpp
Compilation de src/packets/SpheroPacket.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/SpheroPacket.o src/packets/SpheroPacket.cpp
Compilation de src/packets/ClientCommandPacket.cpp
gcc  -Wall -fPIC -fpermissive -Wextra -Woverloaded-virtual -std=c++11 -Isrc  -lbluetooth -lpthread -lrt -c -pthread  -o obj/packets/ClientCommandPacket.o src/packets/ClientCommandPacket.cpp
Fabrication de la bibliothèque
g++  -o libsphero.so obj/Sphero.o obj/bluetooth/bluez_adaptor.o obj/packets/SpheroAsyncPacket.o obj/packets/ChecksumComputer.o obj/packets/Toolbox.o obj/packets/async/CollisionStruct.o obj/packets/async/SpheroCollisionPacket.o obj/packets/async/SpheroStreamingPacket.o obj/packets/async/DataBuffer.o obj/packets/async/SpheroSimpleStreamingPacket.o obj/packets/SpheroAnswerPacket.o obj/packets/SpheroPacket.o obj/packets/ClientCommandPacket.o -shared -lbluetooth -lpthread -lrt 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions