Comments (12)
did you do sudo apt-get update
beforehand? It should download the available package lists.
from ev3dev-lang-cpp.
Yes, this was the result:
Ign:1 http://security.debian.org stretch/updates InRelease
Ign:2 http://httpredir.debian.org/debian stretch InRelease
Ign:3 http://security.debian.org unstable/updates InRelease
Get:4 http://httpredir.debian.org/debian unstable InRelease [191 kB]
Err:5 http://security.debian.org stretch/updates Release
404 Not Found
Ign:6 http://security.debian.org unstable/updates Release
Ign:7 http://security.debian.org unstable/updates/non-free armel Packages
Ign:8 http://security.debian.org unstable/updates/contrib all Packages
Ign:9 http://security.debian.org unstable/updates/non-free all Packages
Ign:10 http://security.debian.org unstable/updates/contrib armel Packages
Ign:11 http://security.debian.org unstable/updates/main all Packages
Ign:12 http://security.debian.org unstable/updates/main armel Packages
Ign:7 http://security.debian.org unstable/updates/non-free armel Packages
Ign:8 http://security.debian.org unstable/updates/contrib all Packages
Ign:9 http://security.debian.org unstable/updates/non-free all Packages
Ign:10 http://security.debian.org unstable/updates/contrib armel Packages
Hit:13 http://archive.ev3dev.org/debian stretch InRelease
Ign:11 http://security.debian.org unstable/updates/main all Packages
Ign:12 http://security.debian.org unstable/updates/main armel Packages
Ign:7 http://security.debian.org unstable/updates/non-free armel Packages
Ign:8 http://security.debian.org unstable/updates/contrib all Packages
Ign:9 http://security.debian.org unstable/updates/non-free all Packages
Ign:14 http://archive.ev3dev.org/debian unstable InRelease
Ign:15 http://httpredir.debian.org/debian stretch Release
Ign:10 http://security.debian.org unstable/updates/contrib armel Packages
Ign:11 http://security.debian.org unstable/updates/main all Packages
Ign:12 http://security.debian.org unstable/updates/main armel Packages
Ign:16 http://httpredir.debian.org/debian stretch/main all Packages
Ign:7 http://security.debian.org unstable/updates/non-free armel Packages
Ign:8 http://security.debian.org unstable/updates/contrib all Packages
Ign:17 http://archive.ev3dev.org/debian unstable Release
Ign:9 http://security.debian.org unstable/updates/non-free all Packages
Ign:18 http://httpredir.debian.org/debian stretch/non-free all Packages
Ign:10 http://security.debian.org unstable/updates/contrib armel Packages
Ign:11 http://security.debian.org unstable/updates/main all Packages
Ign:19 http://httpredir.debian.org/debian stretch/contrib all Packages
Ign:12 http://security.debian.org unstable/updates/main armel Packages
Ign:7 http://security.debian.org unstable/updates/non-free armel Packages
Ign:20 http://httpredir.debian.org/debian stretch/non-free armel Packages
Ign:8 http://security.debian.org unstable/updates/contrib all Packages
Ign:9 http://security.debian.org unstable/updates/non-free all Packages
Ign:21 http://archive.ev3dev.org/debian unstable/main all Packages
Ign:22 http://httpredir.debian.org/debian stretch/main armel Packages
Ign:10 http://security.debian.org unstable/updates/contrib armel Packages
Ign:11 http://security.debian.org unstable/updates/main all Packages
Ign:12 http://security.debian.org unstable/updates/main armel Packages
Ign:23 http://httpredir.debian.org/debian stretch/contrib armel Packages
Err:7 http://security.debian.org unstable/updates/non-free armel Packages
404 Not Found
Ign:8 http://security.debian.org unstable/updates/contrib all Packages
Ign:16 http://httpredir.debian.org/debian stretch/main all Packages
Ign:9 http://security.debian.org unstable/updates/non-free all Packages
Ign:18 http://httpredir.debian.org/debian stretch/non-free all Packages
Ign:19 http://httpredir.debian.org/debian stretch/contrib all Packages
Ign:10 http://security.debian.org unstable/updates/contrib armel Packages
Ign:11 http://security.debian.org unstable/updates/main all Packages
Ign:24 http://archive.ev3dev.org/debian unstable/main armel Packages
Ign:20 http://httpredir.debian.org/debian stretch/non-free armel Packages
Ign:12 http://security.debian.org unstable/updates/main armel Packages
Ign:22 http://httpredir.debian.org/debian stretch/main armel Packages
Ign:23 http://httpredir.debian.org/debian stretch/contrib armel Packages
Ign:16 http://httpredir.debian.org/debian stretch/main all Packages
Ign:18 http://httpredir.debian.org/debian stretch/non-free all Packages
Ign:21 http://archive.ev3dev.org/debian unstable/main all Packages
Ign:19 http://httpredir.debian.org/debian stretch/contrib all Packages
Ign:20 http://httpredir.debian.org/debian stretch/non-free armel Packages
Ign:22 http://httpredir.debian.org/debian stretch/main armel Packages
Ign:24 http://archive.ev3dev.org/debian unstable/main armel Packages
Ign:23 http://httpredir.debian.org/debian stretch/contrib armel Packages
Ign:16 http://httpredir.debian.org/debian stretch/main all Packages
Ign:18 http://httpredir.debian.org/debian stretch/non-free all Packages
Ign:19 http://httpredir.debian.org/debian stretch/contrib all Packages
Ign:21 http://archive.ev3dev.org/debian unstable/main all Packages
Ign:20 http://httpredir.debian.org/debian stretch/non-free armel Packages
Ign:22 http://httpredir.debian.org/debian stretch/main armel Packages
Ign:23 http://httpredir.debian.org/debian stretch/contrib armel Packages
Ign:24 http://archive.ev3dev.org/debian unstable/main armel Packages
Ign:16 http://httpredir.debian.org/debian stretch/main all Packages
Ign:18 http://httpredir.debian.org/debian stretch/non-free all Packages
Ign:19 http://httpredir.debian.org/debian stretch/contrib all Packages
Ign:21 http://archive.ev3dev.org/debian unstable/main all Packages
Ign:20 http://httpredir.debian.org/debian stretch/non-free armel Packages
Ign:22 http://httpredir.debian.org/debian stretch/main armel Packages
Ign:23 http://httpredir.debian.org/debian stretch/contrib armel Packages
Ign:16 http://httpredir.debian.org/debian stretch/main all Packages
Ign:24 http://archive.ev3dev.org/debian unstable/main armel Packages
Ign:18 http://httpredir.debian.org/debian stretch/non-free all Packages
Ign:19 http://httpredir.debian.org/debian stretch/contrib all Packages
Err:20 http://httpredir.debian.org/debian stretch/non-free armel Packages
404 Not Found
Ign:21 http://archive.ev3dev.org/debian unstable/main all Packages
Ign:22 http://httpredir.debian.org/debian stretch/main armel Packages
Ign:23 http://httpredir.debian.org/debian stretch/contrib armel Packages
Ign:24 http://archive.ev3dev.org/debian unstable/main armel Packages
Ign:21 http://archive.ev3dev.org/debian unstable/main all Packages
Err:24 http://archive.ev3dev.org/debian unstable/main armel Packages
404 Not Found
Get:25 http://httpredir.debian.org/debian unstable/main armel Packages [8997 kB]
Get:26 http://httpredir.debian.org/debian unstable/non-free armel Packages [56.7 kB]
Reading package lists... Done
E: The repository 'http://security.debian.org stretch/updates Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://security.debian.org unstable/updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://httpredir.debian.org/debian stretch Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://archive.ev3dev.org/debian unstable Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
from ev3dev-lang-cpp.
Looks like the recommended way to cross-compile now is to use docker:
ev3dev/ev3dev#1562
https://www.ev3dev.org/docs/tutorials/using-docker-to-cross-compile/
from ev3dev-lang-cpp.
Ok, thank you
from ev3dev-lang-cpp.
#include
#include
#include
#include "../Headers/ev3dev.h"
using namespace std;
using namespace ev3dev;
int main() {
cout << "Hello, World!" << endl;
while (!button::enter.pressed ());
return 0;
}
Now I want to compile this code, but I get this error:
/tmp/ccVUrwnY.o: In function main': hello.cpp:(.text+0x50): undefined reference to
ev3dev::button::pressed() const'
hello.cpp:(.text+0x90): undefined reference to `ev3dev::button::enter'
collect2: error: ld returned 1 exit status
from ev3dev-lang-cpp.
You need to link it with the ev3dev.o
, which you can get by compiling ev3dev.cpp
. Or just pass both hello.cpp and ev3dev.cpp to the compiler.
from ev3dev-lang-cpp.
If I try to compile ev3dev.cpp I get this error:
/usr/lib/gcc-cross/arm-linux-gnueabi/6/../../../../arm-linux-gnueabi/lib/Scrt1.o: In function _start': (.text+0x54): undefined reference to
main'
collect2: error: ld returned 1 exit status
Also some source files can't be opened, like linux/fb.h
Just to let you know, this is my compile command:
docker run --rm -it -v C:\Users\Florian\Documents\WRO\C++\wro:/src -w /src ev3cc arm-linux-gnueabi-g++ -o Build/ev3dev Sources/ev3dev.cpp
from ev3dev-lang-cpp.
You need to either compile and link both at once:
g++ -o hello hello.cpp ev3dev.cpp
or compile the cpp files into object files and then link those:
g++ -c -o ev3dev.o ev3dev.cpp
g++ -c -o hello.o hello.cpp
g++ -o hello hello.o ev3dev.o
from ev3dev-lang-cpp.
Thank you very much, it works with both methods one last question what's faster the first or the second method?
from ev3dev-lang-cpp.
from ev3dev-lang-cpp.
On the second thought, if you use a build system (makefile or cmake), then the second method would be faster, since ev3dev only needs to be compiled once.
from ev3dev-lang-cpp.
Thank you very much for your time and help :)
from ev3dev-lang-cpp.
Related Issues (20)
- Cannot compile library on brick HOT 3
- Cross Compiling on Windows command not working HOT 7
- ev3dev-lang-cpp ready for ev3dev-stretch ? HOT 5
- Access file as quickly as possible HOT 19
- Problem to run a simple motor program HOT 2
- CMakeLists.txt forces C++11, breaking C++14 projects wanting to include it HOT 2
- Problem with pthread_xxx code (version GLIBCXX_3.4.21 not found) HOT 4
- What i should do with these files? HOT 1
- Mindstorms freezes while doing apt-get update HOT 2
- Connecting two large EV3 motors HOT 14
- Would you be interested in working UTs which could be run on host system? HOT 1
- What happened to Carlson Minot? HOT 4
- can't install gcc-5/unstable
- Python bindings seem to be faster than CPP for `infrared_sensor.proximity()` or `touch_sensor.is_pressed()` HOT 4
- Multiple definitions of symbols when linking HOT 1
- small question about polarity and speed_sp values on a motor HOT 1
- Support for bluetooth connections?
- Step 7, installing the librarys, doesnt work anymore. HOT 3
- Installation unter Windows 11 schlägt fehlt, Package kann nicht gefunden werden
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ev3dev-lang-cpp.