zoukankan      html  css  js  c++  java
  • gpioke 编译

    用qt 的

    mingw32-make

    下载源码和编译:

    https://gist.github.com/Mapleaph/c45593300af2fe54d5219c97ecebe77c


    直接 mingw32-make


    F:evideox86服务器相关技术h310gpiokec45593300af2fe54d5219c97ecebe77c-587d7f45894759b38ad9149e8ccb35356674c3a4>mingw32-make -f Makefile.win
    gcc -Wall -o gpioke gpioke.c -L. -lpci -lwinio64
    gpioke.c: In function 'try_pch':
    gpioke.c:343:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
          PBYTE sbmap = (PBYTE)((u64)sbreg_addr);
                        ^
    C:UsersJamesAppDataLocalTempccOlDJrj.o:gpioke.c:(.text+0x548): undefined reference to `GetPortVal@12'
    C:UsersJamesAppDataLocalTempccOlDJrj.o:gpioke.c:(.text+0x5c4): undefined reference to `GetPortVal@12'
    C:UsersJamesAppDataLocalTempccOlDJrj.o:gpioke.c:(.text+0x640): undefined reference to `GetPortVal@12'
    C:UsersJamesAppDataLocalTempccOlDJrj.o:gpioke.c:(.text+0xc50): undefined reference to `GetPhysLong@8'
    C:UsersJamesAppDataLocalTempccOlDJrj.o:gpioke.c:(.text+0xc8e): undefined reference to `SetPhysLong@8'
    C:UsersJamesAppDataLocalTempccOlDJrj.o:gpioke.c:(.text+0x15a7): undefined reference to `InitializeWinIo@0'
    C:UsersJamesAppDataLocalTempccOlDJrj.o:gpioke.c:(.text+0x163c): undefined reference to `ShutdownWinIo@0'
    collect2.exe: error: ld returned 1 exit status
    mingw32-make: *** [Makefile.win:6: gpioke] Error 1


    分析原因是因为qt编译器是32位版本

    修改编译选项:

    LDFLAGS = -L. -lpci -lwinio32
    #LDFLAGS = -L. -lpci –lwinio64


    mingw32-make 通过。




    • 打开系统调试模式:cmd下运行 bcdedit /set testsigning on
    • 安装数字签名

      步骤如下: 打开 WinIO64.sys的属性框,翻到“数字签名”选项卡,点击“详细信息” 在新出来的对话框中点击“查看证书” 在又新出来的对话框中点击“安装证书” 点击“下一步”,然后选择“将所有的证书放入下列存储” 点击浏览,选择“受信任的根证书发布机构” 点击“下一步”,然后点击“完成” 在弹出的“安全性警告”对话框中选择“是”,才能导入成功 然后重启。

    注意 win7及以上系统需要以管理员权限打开应用。如开发的时候需要以管理员方式运行eclipse,否则winio会初始化失败!!!



    C:WINDOWSsystem32>bcdedit /set testsigning on
    设置元素数据时出错。
    该值受安全引导策略保护,无法进行修改或删除。

    参考:

    https://zhuanlan.zhihu.com/p/34743309


    去bios里面,关闭  Secure Boot

  • 相关阅读:
    BZOJ 2212/BZOJ 3702
    BZOJ 4761 Cow Navigation
    BZOJ 3209 花神的数论题
    BZOJ 4760 Hoof, Paper, Scissors
    BZOJ 3620 似乎在梦中见过的样子
    BZOJ 3940 Censoring
    BZOJ 3942 Censoring
    BZOJ 3571 画框
    BZOJ 1937 最小生成树
    BZOJ 1058 报表统计
  • 原文地址:https://www.cnblogs.com/cute/p/14296438.html
Copyright © 2011-2022 走看看