Results 1 to 2 of 2

Thread: volatile - extern problem with libusb how do protect external variale?

  1. #1
    Join Date
    Mar 2018
    Posts
    30
    Thanks
    18
    Qt products
    Qt5
    Platforms
    Windows

    Default volatile - extern problem with libusb how do protect external variale?

    First at all: on the zip that i have attached is not included the libusb files.

    If i decomment inside variabili.h all variable and run in debug mode the program, all gone well (i can read data from my joistick and print it; the main window needed for future implementation).

    Inside the comment "TEST 01" i'm trying to protect tha variable, in the original write they are global (i don't want it).

    My question is: is it possible to do it or when the program run inside "static void LIBUSB_CALL cb_function(struct libusb_transfer *transfer)" the only way to access to an external variable is to make it global??

    I'm not a pure programmer, so if is it possible, please write some how i can do it? Thank you.
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2018
    Posts
    30
    Thanks
    18
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: volatile - extern problem with libusb how do protect external variale?

    I have forgetten to list the errors:
    error: undefined reference to `g_exit'
    error: undefined reference to `print_only_difference'
    error: undefined reference to `answer_old'
    error: collect2.exe: error: ld returned 1 exit status
    Last edited by andreaQt; 14th November 2020 at 08:37.

Similar Threads

  1. Problem with libusb in macOS high Sierra
    By Eduardo Huerta in forum Newbie
    Replies: 4
    Last Post: 13th January 2019, 01:09
  2. [Android] volatile size of screen
    By franki in forum Qt Programming
    Replies: 3
    Last Post: 10th January 2013, 09:54
  3. Replies: 6
    Last Post: 7th November 2012, 06:13
  4. Protect PDF File
    By wirasto in forum Newbie
    Replies: 2
    Last Post: 25th August 2009, 11:19
  5. Problem on set QGraphicsTextItem write protect.
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 22nd July 2007, 21:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.