'_Wire' was not declared in this scope | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar
Please consider registering
guest
sp_LogInOut Log In sp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
'_Wire' was not declared in this scope
September 15, 2019
12:49 am
Avatar
RTSLVU
Member
Members
Forum Posts: 21
Member Since:
March 20, 2015
sp_UserOfflineSmall Offline

I am trying to get back into this Compiler and I am beginning to remember why I abandoned it.

I started a little project with an LCD and RTC data logger shield and nothing will compile, NOT EVEN the example programs!

 

Here's an attempt to compile C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\Aledyne-TSXperts\Arduino Compatible Compiler for LabVIEW\Code Generator\Arduino APIs\Timing\Read RTC Time and Format.vi

 

1.0.0.21, Arduino/Genuino Uno
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
C:\Users\bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp\temp.ino: In function 'void setup()':

C:\Users\bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp\temp.ino:42:16: warning: converting NULL to non-pointer type [-Wconversion-null]

     switch(NULL)

                ^

temp:45:13: error: '_Wire' was not declared in this scope

             _Wire[Interface_253]->beginTransmission(Slave_Address_225);

             ^

temp:63:9: error: '_Wire' was not declared in this scope

         _Wire[Interface_253]->requestFrom(Slave_Address_225, Const1583, (uint8_t)NULL);

         ^

C:\Users\bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp\temp.ino:88:58: warning: passing NULL to non-pointer argument 3 of 'void NumberToDecString(String*, unsigned char, short int)' [-Wconversion-null]

         NumberToDecString(&Node2903Out, Node1631Out, NULL);

                                                          ^

C:\Users\bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp\temp.ino:93:57: warning: passing NULL to non-pointer argument 3 of 'void NumberToDecString(String*, unsigned char, short int)' [-Wconversion-null]

         NumberToDecString(&Node760Out, Node1643Out, NULL);

                                                         ^

C:\Users\bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp\temp.ino:100:56: warning: passing NULL to non-pointer argument 3 of 'void NumberToDecString(String*, short unsigned int, short int)' [-Wconversion-null]

         NumberToDecString(&Node44Out, Node2585Out, NULL);

                                                        ^

C:\Users\bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp\temp.ino:105:57: warning: passing NULL to non-pointer argument 3 of 'void NumberToDecString(String*, unsigned char, short int)' [-Wconversion-null]

         NumberToDecString(&Node247Out, Node1664Out, NULL);

                                                         ^

exit status 1

September 15, 2019
2:24 am
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

You are trying to build a sub-vi, not an example.  The example you want is probably DS1307 Real Time Clock.vi in the examples folder.  This calls the Read RTC Time and Format.vi subvi above.  The reason there is an error is because the Read RTC Time and Format.vi subvi does not initialize and open the I2C peripheral.  That is handled at the beginning of the example and is required for it to compile properly.

September 15, 2019
11:06 pm
Avatar
RTSLVU
Member
Members
Forum Posts: 21
Member Since:
March 20, 2015
sp_UserOfflineSmall Offline

Hmm okay in that case I may have been trying to compile the sub-vi. I was just trying to figure out why nothing will compile anymore when I know this compiler works and I have used this before being one of the pre-release buyers.

Now even trying to compile "Blink LED.vi" gets this error

Why is compiling "Blink LED" also trying to compile "Read_RTC_Time_and_Format" ?

1.0.0.21, Arduino/Genuino Uno
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
C:\Users\Bob\AppData\Local\Temp\ccIxaIyk.ltrans0.ltrans.o: In function `setup':

C:\Users\Bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp/temp.ino:60: undefined reference to `Wire'

C:\Users\Bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp/temp.ino:60: undefined reference to `Wire'

C:\Users\Bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp/temp.ino:70: undefined reference to `TwoWire::begin()'

C:\Users\Bob\AppData\Local\Temp\ccIxaIyk.ltrans0.ltrans.o: In function `Read_RTC_Time_and_Format':

C:\Users\Bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp/temp.ino:232: undefined reference to `TwoWire::beginTransmission(unsigned char)'

C:\Users\Bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp/temp.ino:234: undefined reference to `TwoWire::endTransmission(unsigned char)'

C:\Users\Bob\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp/temp.ino:250: undefined reference to `TwoWire::requestFrom(unsigned char, unsigned char, unsigned char)'

collect2.exe: error: ld returned 1 exit status

exit status 1

Image Enlarger

September 16, 2019
4:38 am
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

I took a look at your submitted error logs and files and I was able to compile the submitted code for the example above ok on my end.  It looks as if something happened with you local Arduino Wire library but not sure why it would even try compiling anything from Wire with this example.  I did a search on the Arduino forums and here are a few links that may help.  Did you try restarting everything down and restarting?  It almost looks like a cached code issue from your other VIs that use Wire.  You could also try uninstalling and reinstalling the Arduino IDE to see if that resolves it.

https://forum.arduino.cc/index.....c=473459.0

https://forum.arduino.cc/index.....c=513171.0

Also, in one of your submitted projects there is the use of a '?' in the case selectors, which conflicts with the ternary operator in C and should not be used.  If you remove that from the case selectors, then this one compiles fine.

September 16, 2019
1:36 pm
Avatar
RTSLVU
Member
Members
Forum Posts: 21
Member Since:
March 20, 2015
sp_UserOfflineSmall Offline

Manually clearing all the files in C:\Users\Bob\AppData\Local\Temp\ fixed this error.

The temporary directory is not always being properly cleared after one or more failed compilations

Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
2
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
miche91: 33
scottj: 28
scadao: 23
Member Stats:
Guest Posters: 5
Members: 202
Moderators: 0
Admins: 3
Forum Stats:
Groups: 1
Forums: 2
Topics: 266
Posts: 1222
Newest Members:
pujacontrol
Administrators: geadmin: 22, filipealtoe: 96, Steffan: 356