n2n
n2n copied to clipboard
How to import n2n.lib to windows QT?
Hi, I'm trying to import n2n.lib to my Qt project. Here is the errors what I got.
First trial
Directory structure
TestQT
├── n2n # API server
├── include # same as include dir as n2n-2.8 stable repo
└── n2n.lib # Built by following Building.md
├── edge.cpp # Trying to do function to connect supernode
└── TestQT.pro # My Qt configurations
Errors
Cannot open include file: 'win32/n2n_win32.h': No such file or directory
After copying win32 folder from n2n folder
Directory structure
TestQT
├── n2n # API server
├── n2n.lib # Built by following Building.md
└── include # same as include dir as n2n-2.8 stable repo
└── win32 # Folder copied from n2n folder
├── edge.cpp # Trying to do function to connect supernode
└── TestQT.pro # My Qt configurations
Errors
Cannot open include file: 'config.h': No such file or directory
After adding config.h based on #366
Directory structure
TestQT
├── n2n # API server
├── n2n.lib # Built by following Building.md
└── include # same as include dir as n2n-2.8 stable repo
├── config.h # Added
└── win32 # Folder copied from n2n folder
├── edge.cpp # Trying to do function to connect supernode
└── TestQT.pro # My Qt configurations
Errors
'speck_context_t': redefinition; different basic types
How should I do to import the library properly, I'm using Qt / C++.
- redefine speck_context_t as
typedef struct { u128 rk[34]; u64 key[34]; u32 keysize; }speck_context_t,he_context_t;
- add
#include "speck.h"
in n2n_typedefs.h - delete
typedef struct speck_context_t he_context_t;
in n2n_typedefs.h
@huangli0125 Do you want to provide a pull request?