GithubHelp home page GithubHelp logo

Comments (12)

ddemidov avatar ddemidov commented on August 25, 2024

did you do sudo apt-get update beforehand? It should download the available package lists.

from ev3dev-lang-cpp.

flemmii avatar flemmii commented on August 25, 2024

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.

ddemidov avatar ddemidov commented on August 25, 2024

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.

flemmii avatar flemmii commented on August 25, 2024

Ok, thank you

from ev3dev-lang-cpp.

flemmii avatar flemmii commented on August 25, 2024

#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.

ddemidov avatar ddemidov commented on August 25, 2024

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.

flemmii avatar flemmii commented on August 25, 2024

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.

ddemidov avatar ddemidov commented on August 25, 2024

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.

flemmii avatar flemmii commented on August 25, 2024

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.

ddemidov avatar ddemidov commented on August 25, 2024

from ev3dev-lang-cpp.

ddemidov avatar ddemidov commented on August 25, 2024

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.

flemmii avatar flemmii commented on August 25, 2024

Thank you very much for your time and help :)

from ev3dev-lang-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.