Libs are not found for platform = windows_x86

Why are libraries not found when using ‘platform = windows_x86’ ?

A simple project using one library dependency does not work, that is the LDF does not find the library and says the source header file is not found.

This project does not work

[env:windows_x86]
platform = windows_x86

lib_deps = chris--a/BitBool@^1.2.0

then this main.cpp in src folder

#include <stdio.h>

//#define USE_STANDARD_BOOL
#define MAX_ITEMS 100
 
#include <BitBool.h>
 
#ifdef USE_STANDARD_BOOL
  bool b_Array[ MAX_ITEMS ] = { true, true, true };
#else
  BitBool< MAX_ITEMS > b_Array = { B00000111 };
#endif
 
 
void test()
{
    bool b_TempCopy = b_Array[ MAX_ITEMS - 1 ];
     
    //Roll items up.
    for( int i_Index = MAX_ITEMS - 1 ; i_Index ; --i_Index )
      b_Array[ i_Index ] = b_Array[ i_Index - 1 ];
    b_Array[ 0 ] = b_TempCopy;
     
    //Show contents.
    printf("[");
    for( int i_Index = 0 ; i_Index < MAX_ITEMS ; ++i_Index ) 
      printf("%c", b_Array[ i_Index ] ? '#' : '-' );
    printf("]\r\n");
}


int main(int argc, char *argv[])
{
  printf("run bit bool test\n");
	test();
}

Does adding lib_compat_mode = off to the platformio.ini (docs) make a difference?

Great, this work :sunny:
However for this library I then discovered I also needed C++11. So ini file is now

[env:windows_x86]
platform = windows_x86
build_flags = '-std=c++11'
lib_compat_mode = off
lib_deps = chris--a/BitBool@^1.2.0
1 Like