GithubHelp home page GithubHelp logo

Comments (6)

ddemidov avatar ddemidov commented on August 25, 2024

What are you using as a linker (echo $LD)?

from ev3dev-lang-cpp.

agentS avatar agentS commented on August 25, 2024

I am letting arm-linux-gnueabi-g++ select the linker. I have updated the issue and included my makefile. However, I did not set the environment variable $LD.

from ev3dev-lang-cpp.

ddemidov avatar ddemidov commented on August 25, 2024

I can not test this right now, but in the meanwhile the following might work:

${PROGNAME}: brickCollector.cpp brickCollector.h ev3dev.cpp ev3dev.h
        $(CC) $(LDFLAGS) $(CFLAGS) brickCollector.cpp ev3dev.cpp

from ev3dev-lang-cpp.

ddemidov avatar ddemidov commented on August 25, 2024

I would be most graceful if you could tell me the compiler being used for compiling your library.

I have tested the library with Sourcery codebench crosscompiler (available as sourcery-codebench-arm-none-linux-gnueabi package in Arch linux), and also I think the Using Docker to Cross-Compile worked for me as well.

from ev3dev-lang-cpp.

agentS avatar agentS commented on August 25, 2024

I fixed it by adding the following two lines to the CMakeLists.txt file:

set (CMAKE_C_COMPILER arm-linux-gnueabi-gcc)
set (CMAKE_CXX_COMPILER arm-linux-gnueabi-g++)

I know it's not the optimal solution, but it works.

from ev3dev-lang-cpp.

ddemidov avatar ddemidov commented on August 25, 2024

Ah, so you were building the library with cmake (with normal compiler), and then linking it with cross-compiler. That makes sense now.

I fixed it by adding the following two lines to the CMakeLists.txt file:

You can achieve the same result with the following:

cd ev3dev-lang-cpp/build
rm -rf *
CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++ cmake ..
make

cmake will pick the environment variables and cache those.

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.