# [Solved] Can't compile PrintEx library

Hi,

I’m having trouble to compile the PrintEx library. I open the example and try to compile it but I get the error I pasted at the end (with verbose output). I’m using a Sodaq ONE, and I have the latest versions of the IDE and all the relevant libraries and boards. As I said, any of the example code from the library fails to compile, it complains about va list not being declared. It compiles under AVR (arduino Uno), but doesn’t for the Zero.

Can somebody lend me a hand?

``````C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Joel\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Joel\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries` C:\Users\Joel\Desktop\Dropbox\Arduino\libraries -fqbn=SODAQ:samd:sodaq_one_beta -vid-pid=0X2341_0X804D -ide-version=10804 -build-path C:\Users\Joel\AppData\Local\Temp\arduino_build_148330 -warnings=none -build-cache C:\Users\Joel\AppData\Local\Temp\arduino_cache_300099 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.openocd.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.9.0-arduino -prefs=runtime.tools.bossac.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.avrdude.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino8 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0 -prefs=runtime.tools.CMSIS.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -verbose C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\examples\basic_usage\basic_usage.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Joel\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Joel\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Joel\Desktop\Dropbox\Arduino\libraries -fqbn=SODAQ:samd:sodaq_one_beta -vid-pid=0X2341_0X804D -ide-version=10804 -build-path C:\Users\Joel\AppData\Local\Temp\arduino_build_148330 -warnings=none -build-cache C:\Users\Joel\AppData\Local\Temp\arduino_cache_300099 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.openocd.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.9.0-arduino -prefs=runtime.tools.bossac.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.avrdude.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino8 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0 -prefs=runtime.tools.CMSIS.path=C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -verbose C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\examples\basic_usage\basic_usage.ino
Using board 'sodaq_one_beta' from platform in folder: C:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14
Using core 'arduino' from platform in folder: C:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14
Detecting libraries used...
"C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10804 -DARDUINO_SODAQ_ONE_BETA -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="SODAQ"' '-DUSB_PRODUCT="SODAQ ONE"' "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_one_beta" "C:\Users\Joel\AppData\Local\Temp\arduino_build_148330\sketch\basic_usage.ino.cpp" -o "nul"
"C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10804 -DARDUINO_SODAQ_ONE_BETA -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="SODAQ"' '-DUSB_PRODUCT="SODAQ ONE"' "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_one_beta" "-IC:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src" "C:\Users\Joel\AppData\Local\Temp\arduino_build_148330\sketch\basic_usage.ino.cpp" -o "nul"
"C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10804 -DARDUINO_SODAQ_ONE_BETA -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="SODAQ"' '-DUSB_PRODUCT="SODAQ ONE"' "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_one_beta" "-IC:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src" "C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src\lib\MemoryPrinter.cpp" -o "nul"
"C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10804 -DARDUINO_SODAQ_ONE_BETA -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="SODAQ"' '-DUSB_PRODUCT="SODAQ ONE"' "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_one_beta" "-IC:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src" "C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src\lib\PrintExtension.cpp" -o "nul"
"C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10804 -DARDUINO_SODAQ_ONE_BETA -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="SODAQ"' '-DUSB_PRODUCT="SODAQ ONE"' "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_one_beta" "-IC:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src" "C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src\lib\StreamExtension.cpp" -o "nul"
"C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10804 -DARDUINO_SODAQ_ONE_BETA -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="SODAQ"' '-DUSB_PRODUCT="SODAQ ONE"' "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_one_beta" "-IC:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src" "C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src\tools\Base64Encoder\Base64Encoder.cpp" -o "nul"
"C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10804 -DARDUINO_SODAQ_ONE_BETA -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="SODAQ"' '-DUSB_PRODUCT="SODAQ ONE"' "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_one_beta" "-IC:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src" "C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src\tools\CRCStream\CRCStream.cpp" -o "nul"
"C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10804 -DARDUINO_SODAQ_ONE_BETA -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="SODAQ"' '-DUSB_PRODUCT="SODAQ ONE"' "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_one_beta" "-IC:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src" "C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src\tools\URIEncoder\URIEncoder.cpp" -o "nul"
Generating function prototypes...
"C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10804 -DARDUINO_SODAQ_ONE_BETA -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="SODAQ"' '-DUSB_PRODUCT="SODAQ ONE"' "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_one_beta" "-IC:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src" "C:\Users\Joel\AppData\Local\Temp\arduino_build_148330\sketch\basic_usage.ino.cpp" -o "C:\Users\Joel\AppData\Local\Temp\arduino_build_148330\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Joel\AppData\Local\Temp\arduino_build_148330\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10804 -DARDUINO_SODAQ_ONE_BETA -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON '-DUSB_MANUFACTURER="SODAQ"' '-DUSB_PRODUCT="SODAQ ONE"' "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.1.0/CMSIS/Device/ATMEL/" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino" "-IC:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_one_beta" "-IC:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src" "C:\Users\Joel\AppData\Local\Temp\arduino_build_148330\sketch\basic_usage.ino.cpp" -o "C:\Users\Joel\AppData\Local\Temp\arduino_build_148330\sketch\basic_usage.ino.cpp.o"
In file included from C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src/lib/MemoryPrinter.h:25:0,

from C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src/PrintEx.h:26,

from C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\examples\basic_usage\basic_usage.ino:8:

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src/lib/PrintExtension.h: In member function 'pft PrintExWrap<T>::printf(const char*, ...)':

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src/lib/PrintExtension.h:129:13: error: 'va_list' was not declared in this scope

va_list vList;

^

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src/lib/PrintExtension.h:129:21: error: expected ';' before 'vList'

va_list vList;

^

In file included from C:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino/Print.h:83:0,

from C:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino/Stream.h:26,

from C:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino/HardwareSerial.h:24,

from C:\Users\Joel\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\cores\arduino/Arduino.h:80,

from C:\Users\Joel\AppData\Local\Temp\arduino_build_148330\sketch\basic_usage.ino.cpp:1:

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576\src/lib/PrintExtension.h:130:23: error: 'vList' was not declared in this scope

va_start( vList, format );

^

Using library arduino_109576 at version 1.2.0 in folder: C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\arduino_109576
exit status 1
Error compiling for board SODAQ ONE Beta.'''``````

The va_list type is defined in cstdarg. On the AVR platform this seems to be included by default, on the SAMD platform this is not the case.

Simple add this to your sketch or library:

``#include <cstdarg>``

Hi,

Thanks for your reply, and sorry for taking this much time to come back to you. As a matter of fact, I had that library already included for another function, but I still can’t compile. This is the error:

``````In file included from C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\MemoryPrinter.h:25:0,

from C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\MemoryPrinter.cpp:24:

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\PrintExtension.h:72:52: error: 'va_list' does not name a type

pft _printf( const char *format, const va_list &v_List );

^

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\PrintExtension.h:72:61: error: ISO C++ forbids declaration of 'v_List' with no type [-fpermissive]

pft _printf( const char *format, const va_list &v_List );

^

In file included from C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\MemoryPrinter.h:25:0,

from C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\MemoryPrinter.cpp:24:

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\PrintExtension.h: In member function 'pft PrintExWrap<T>::printf(const char*, ...)':

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\PrintExtension.h:129:13: error: 'va_list' was not declared in this scope

va_list vList;

^

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\PrintExtension.h:129:21: error: expected ';' before 'vList'

va_list vList;

^

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\PrintExtension.h:130:23: error: 'vList' was not declared in this scope

va_start( vList, format );

^

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\PrintExtension.h:130:37: error: there are no arguments to 'va_start' that depend on a template parameter, so a declaration of 'va_start' must be available [-fpermissive]

va_start( vList, format );

^

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\PrintExtension.h:130:37: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)

C:\Users\Joel\Desktop\Dropbox\Arduino\libraries\PrintEx\src\lib\PrintExtension.h:133:27: error: there are no arguments to 'va_end' that depend on a template parameter, so a declaration of 'va_end' must be available [-fpermissive]

va_end( vList );

^

exit status 1
Error compiling for board SODAQ ONE.
``````

My list of includes is this one:

``````#include <stdlib.h> // for the custom dtostrf
#include <cstdarg>
#include <stdarg.h> // for the printf wrapper
#include <SPI.h>
#include <SD.h>
#include <Wire.h> // Used to establied serial communication on the I2C bus
#include <RTCZero.h> // Real time clock in the SAMD21
#include "avdweb_SAMDtimer.h"
#include "SparkFunTMP102.h" // Used to send and recieve specific information from our sensor
#include <Sodaq_UBlox_GPS.h>
#include <ATT_IOT_LoRaWAN.h>
#include <MicrochipLoRaModem.h>
//#include "keys_Tracker1.h"
#include "keys_Tracker2.h"
#include "LightSensor.h" //ancillary functions for the light sensor
`````````

It could be something to do with the order that Arduino compiles the libraries.

Can you try modifying PrintEx.h and add the required include before any others.

Hi,

I did as you suggested and it still complained about the same issue in two or three other libraries that are called by PrintEX.h, so I added the include on them too, which from my understanding should not be necessary, but anyway, now it compiles. Thanks!

It probably is related to the order in which the Arduino toolchain compiles the required files.

It might be worth making a request to get that header included into the Arduino SAMD core, as I can imagine other people may run into this issue as well.

Good idea,

I did a search on `#include <cstdarg>` on the all the library files, and saw that it is included in the zero, but obviously, they don’t include it for the Sodaq.

In Global.h:

``````    #ifdef ARDUINO_SAMD_ZERO //ARDUINO_ARCH_SAMD
#include <cstdarg>
#endif````

``````#ifdef ARDUINO_SODAQ_ONE //ARDUINO_ARCH_SAMD