On 11/10/2017 05:16 AM, 翟墨 wrote:
> Dear developers:
>        Hi! I built iotivity-1.2.1 both on Raspberry 3. I want to modify the
> code of  simpleserver to operate the gpio to control the led light state.
> Hence, I added following code before void put(OCRpresentation &rep) in
> simpleserver:
> void controlLight(bool state){
>      if(state == true){
>           digitalWrite(10,LOW);
>       }else{
>           digitalWrite(10,HIGH);
>       }
> }
> By the way, I added the #include <wiringPi.h> , and  WiringPi was installed.
> When the program invoke put(OCRpresentation &rep), I can control the led
> light state by using controlLight(m_state) in put() function.
> However, I met a problem: undefined reference to 'digitalWrite' when
> Linking. I found the wiringPi.h and wiringPi.so in lib and include, so I
> don't know what's problem.
> Can any one help me ?
>       Zhai

if you save the build output, it would be useful to see what the compile
line actually is - we're looking for -I and -l things emitted and more
specific warnings during the build.


_______________________________________________
iotivity-dev mailing list
[email protected]
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to