We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b80421 commit 474d40bCopy full SHA for 474d40b
drivers/libusb.h
@@ -2,7 +2,7 @@
2
#define COMMON_H
3
4
#include <libusb.h>
5
-static libusb_context *context = nullptr;
+extern libusb_context *context;
6
7
#endif
8
main.cpp
@@ -2,9 +2,12 @@
#include "mainwindow.h"
#include <QApplication>
+libusb_context *context = nullptr;
+
int main(int argc, char *argv[]) {
auto rc = libusb_init(&context);
9
Q_ASSERT(rc >= 0);
10
+ Q_ASSERT(context != nullptr);
11
12
QCoreApplication::setOrganizationName("TUNA");
13
QCoreApplication::setOrganizationDomain("tuna.tsinghua.edu.cn");
0 commit comments