Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT c++ problems

QT c++ problems

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 565 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lgeorge
    wrote on last edited by
    #1

    I have a small c++ qt program using this code :```

    //your code here
    ```static uint32_t  * gpioReg = MAP_FAILED;
    
    uint32_t gpioRead_Bits_0_31(void)
    {
       return (*(gpioReg + GPLEV0));
    }
    
    the compiler say error which is 
    
     error: invalid conversion from 'void*' to 'uint32_t* {aka unsigned int*}' [-fpermissive]
    
    Can someone help me solved this problems??
    1 Reply Last reply
    0
    • M Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      You should also tell from which line the compiler error message comes from...

      It seems that MAP_FAILED is a void pointer, so you should cast it:
      static uint32_t * gpioReg = (uint32_t *)MAP_FAILED;

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved