{"action":"created","issue":{"url":"https://api.github.com/repos/spark/firmware/issues/523","labels_url":"https://api.github.com/repos/spark/firmware/issues/523/labels{/name}","comments_url":"https://api.github.com/repos/spark/firmware/issues/523/comments","events_url":"https://api.github.com/repos/spark/firmware/issues/523/events","html_url":"https://github.com/spark/firmware/issues/523","id":99767410,"number":523,"title":"build (web) seems to ignore #include for libraries attached to sketch via web UI","user":{"login":"plocher","id":1082871,"avatar_url":"https://avatars.githubusercontent.com/u/1082871?v=3","gravatar_id":"","url":"https://api.github.com/users/plocher","html_url":"https://github.com/plocher","followers_url":"https://api.github.com/users/plocher/followers","following_url":"https://api.github.com/users/plocher/following{/other_user}","gists_url":"https://api.github.com/users/plocher/gists{/gist_id}","starred_url":"https://api.github.com/users/plocher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plocher/subscriptions","organizations_url":"https://api.github.com/users/plocher/orgs","repos_url":"https://api.github.com/users/plocher/repos","events_url":"https://api.github.com/users/plocher/events{/privacy}","received_events_url":"https://api.github.com/users/plocher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/spark/firmware/milestones/9","html_url":"https://github.com/spark/firmware/milestones/0.4.4","labels_url":"https://api.github.com/repos/spark/firmware/milestones/9/labels","id":1207267,"number":9,"title":"0.4.4","description":null,"creator":{"login":"m-mcgowan","id":2465470,"avatar_url":"https://avatars.githubusercontent.com/u/2465470?v=3","gravatar_id":"","url":"https://api.github.com/users/m-mcgowan","html_url":"https://github.com/m-mcgowan","followers_url":"https://api.github.com/users/m-mcgowan/followers","following_url":"https://api.github.com/users/m-mcgowan/following{/other_user}","gists_url":"https://api.github.com/users/m-mcgowan/gists{/gist_id}","starred_url":"https://api.github.com/users/m-mcgowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-mcgowan/subscriptions","organizations_url":"https://api.github.com/users/m-mcgowan/orgs","repos_url":"https://api.github.com/users/m-mcgowan/repos","events_url":"https://api.github.com/users/m-mcgowan/events{/privacy}","received_events_url":"https://api.github.com/users/m-mcgowan/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":6,"state":"open","created_at":"2015-07-14T15:50:21Z","updated_at":"2015-08-13T07:01:58Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-08-08T03:53:39Z","updated_at":"2015-08-13T07:02:44Z","closed_at":null,"body":"After attaching LiquidCrystal_I2C_Spark to my cp-test sketch*, the web UI added the expected\r\n\r\n```C\r\n#include \"LiquidCrystal_I2C_Spark/LiquidCrystal_I2C_Spark.h\"\r\n```\r\n\r\nThe compile then fails because of the (already reported) missing CLOCK_SPEED_100KHZ define, and the suggestion to include the i2c_hal header file doesn't fix things for me...\r\n\r\nIn order to continue my porting effort (yeah, I've got bugs of my own to track down, too!), I commented out the #include and the lcd variables/uses related to the I2C LCD backpack.\r\n\r\n```C\r\n//#include \"LiquidCrystal_I2C_Spark/LiquidCrystal_I2C_Spark.h\"\r\n#ifdef HASLCD\r\n//LiquidCrystal_I2C lcd(0x20 + 7, 16, 2);  // Set the LCD I2C address\r\n#endif\r\n```\r\netc\r\n\r\nAfter saving and verifying my sketch, I was surprised that it still fails - somehow the unwanted and commented out library still seems to be used!\r\n\r\n```C\r\nLiquidCrystal_I2C_Spark/LiquidCrystal_I2C_Spark.cpp: In member function 'void LiquidCrystal_I2C::init_priv()':\r\nThis looks like an error in LiquidCrystal_I2C_Spark library. Would you like to create an issue on GitHub to let the author know?\r\nCREATE ISSUE\r\nLiquidCrystal_I2C_Spark/LiquidCrystal_I2C_Spark.cpp:48:23: error: 'CLOCK_SPEED_100KHZ' was not declared in this scope\r\n         Wire.setSpeed(CLOCK_SPEED_100KHZ);\r\n                       ^\r\n\r\nmake[1]: *** [../build/target/user/platform-6LiquidCrystal_I2C_Spark/LiquidCrystal_I2C_Spark.o] Error 1\r\n```\r\n\r\nIs this a temp file cache error, the way libraries \"work\" in build.io, or worse, a facepalm moment for me :sweat_smile:  ?\r\n-edit- oops, /firmware probably isn't the right place to file this, sorry, too many open browser tabs...\r\n\r\n----\r\n*Happy to share the sketch ID if needed...\r\n"},"comment":{"url":"https://api.github.com/repos/spark/firmware/issues/comments/130559625","html_url":"https://github.com/spark/firmware/issues/523#issuecomment-130559625","issue_url":"https://api.github.com/repos/spark/firmware/issues/523","id":130559625,"user":{"login":"m-mcgowan","id":2465470,"avatar_url":"https://avatars.githubusercontent.com/u/2465470?v=3","gravatar_id":"","url":"https://api.github.com/users/m-mcgowan","html_url":"https://github.com/m-mcgowan","followers_url":"https://api.github.com/users/m-mcgowan/followers","following_url":"https://api.github.com/users/m-mcgowan/following{/other_user}","gists_url":"https://api.github.com/users/m-mcgowan/gists{/gist_id}","starred_url":"https://api.github.com/users/m-mcgowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-mcgowan/subscriptions","organizations_url":"https://api.github.com/users/m-mcgowan/orgs","repos_url":"https://api.github.com/users/m-mcgowan/repos","events_url":"https://api.github.com/users/m-mcgowan/events{/privacy}","received_events_url":"https://api.github.com/users/m-mcgowan/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T07:02:44Z","updated_at":"2015-08-13T07:02:44Z","body":"Adding `#include \"i2c_hal.h\"` will fix references to `CLOCK_SPEED_100KHZ` in the same file that you add the include to, but not to references from within in the I2C library itself. \r\n\r\nThese issues have been fixed and are pending rollout of 0.4.4 to the cloud. "}}