Questions tagged [linker]

In computing, a linker or link editor is a computer utility program that takes one or more object files generated by a compiler or an assembler and combines them into a single executable file, library file, or another 'object' file.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
43 views

Linking C functions [closed]

I am trying to create a library. This is the code: //config.h #ifndef __CONFIG__ #define __CONFIG__ #include <SoftwareSerial.h> #define SERIAL_DEBUG true #define SERIAL_DEBUG_EXTENDED false #...
  • 1,345
0 votes
1 answer
71 views

Inconsistent behavior of include statements?

This question deals with fonts. Well, actually, singular include files with constants that form bitmap fonts or images for LCD or OLED displays, such as this one: https://github.com/ThingPulse/esp8266-...
1 vote
2 answers
1k views

Undefined reference to function in custom library

Hello I am making a private Arduino library but am having trouble understanding how it is linked. Why does this h file work, but when I move the definition of board_led to a matching c file, it throws ...
  • 113
-1 votes
1 answer
37 views

Initializing an object as class member resulting in linking error?

I'm a little dumbfounded as to why this isn't working. I keep getting the following linker error: In file included from src\ac.cpp:1:0: src/ac.h:9:21: error: expected identifier before numeric ...
  • 3
1 vote
1 answer
43 views

Libraries are not linked

I created 4 libraries, each in .h and .cpp files, and tested them individually. I kept the project flexibility by defining 3 flags that allow or disallow the usage of the libraries. When integrating ...
1 vote
1 answer
264 views

Program size optimization

I am trying to spare a few bytes of program size. I faced a problem which I cannot understand and I hope somebody will help. Look at this empty sketch, pleas. It takes just 444 bytes: void setup() { } ...
  • 439
2 votes
1 answer
2k views

ld.exe:linker_script.ld:138 cannot move location counter backwards | ArduinoFFT Error

Board: Arduino Nano 33 BLE Sense I'm pulling PCM data from an onboard microphone and running it through the arduinoFFT library (version 1.5.6) to obtain a spectrogram. Since the arduinoFFT library ...
  • 23
0 votes
1 answer
737 views

Splitting up code in multiple files causing `multiple definition` and `undefined reference` error

I have the following very basic program that reads MPU6050(accelerometer and gyroscope) sensor using the I2C library, and prints the sensor information. This program works as expected. #include <...
0 votes
1 answer
615 views

How to create large progmem arrays and not annoy the linker

I have a rather complex project (PlatformIO, but I've also had this happen in the vanilla IDE) with several nested includes. Let's say that there are three files and a main sketch. The main sketch ...
1 vote
1 answer
535 views

cant figure out how to fix this compile error

evrything worked for a bit and changed to much to get it working again. dont really understand the error. [![C:\Users\bavob\AppData\Local\Temp\ccyfrkaL.ltrans0.ltrans.o: In function `loop': C:\Users\...
  • 27