Comments (3)
Emmm... I seem to have succeeded. I made some changes, mainly changing "ssize_t" to "long long". But there are many warnings when I was compiling the static library.
This is the compile time log:
[ 25%] Building C object CMakeFiles/cotp.dir/src/otp.c.obj
D:\Desktop\libcotp\src\otp.c:239:12: warning: 'strdup' is deprecated: The POSIX name for this item is deprecated.
Instead, use the ISO C and C++ conformant name: _strdup. See online help for details. [-Wdeprecated-declarations]
239 | return strdup (code);
| ^
E:\Windows Kits\10\Include\10.0.22621.0\ucrt\string.h:531:20: note: 'strdup' has been explicitly marked deprecated here
531 | Check_return _CRT_NONSTDC_DEPRECATE(_strdup)
| ^
E:\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
428 | #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(
| ^
E:\Microsoft Visual Studio\Community\VC\Tools\MSVC\14.39.33519\include\vcruntime.h:345:47: note: expanded from macro
'_CRT_DEPRECATE_TEXT'
345 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
| ^
1 warning generated.
[ 50%] Building C object CMakeFiles/cotp.dir/src/utils/whmac_gcrypt.c.obj
In file included from D:\Desktop\libcotp\src\utils\whmac_gcrypt.c:1:
In file included from D:/Desktop/libcotp/build/include\gcrypt.h:31:
D:/Desktop/libcotp/build/include\gpg-error.h:762:5: warning: 'GNUC' is not defined, evaluates to 0 [-Wundef]
762 | #if GNUC
| ^
1 warning generated.
[ 75%] Building C object CMakeFiles/cotp.dir/src/utils/base32.c.obj
D:\Desktop\libcotp\src\utils\base32.c:38:16: warning: 'strdup' is deprecated: The POSIX name for this item is
deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details.
[-Wdeprecated-declarations]
38 | return strdup ("");
| ^
E:\Windows Kits\10\Include\10.0.22621.0\ucrt\string.h:531:20: note: 'strdup' has been explicitly marked deprecated here
531 | Check_return _CRT_NONSTDC_DEPRECATE(_strdup)
| ^
E:\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
428 | #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(
| ^
E:\Microsoft Visual Studio\Community\VC\Tools\MSVC\14.39.33519\include\vcruntime.h:345:47: note: expanded from macro
'_CRT_DEPRECATE_TEXT'
345 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
| ^
D:\Desktop\libcotp\src\utils\base32.c:104:27: warning: 'strdup' is deprecated: The POSIX name for this item is
deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details.
[-Wdeprecated-declarations]
104 | return (uint8_t *)strdup ("");
| ^
E:\Windows Kits\10\Include\10.0.22621.0\ucrt\string.h:531:20: note: 'strdup' has been explicitly marked deprecated here
531 | Check_return _CRT_NONSTDC_DEPRECATE(_strdup)
| ^
E:\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
428 | #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(
| ^
E:\Microsoft Visual Studio\Community\VC\Tools\MSVC\14.39.33519\include\vcruntime.h:345:47: note: expanded from macro
'_CRT_DEPRECATE_TEXT'
345 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
| ^
D:\Desktop\libcotp\src\utils\base32.c:111:23: warning: 'strdup' is deprecated: The POSIX name for this item is
deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details.
[-Wdeprecated-declarations]
111 | char *user_data = strdup (user_data_untrimmed);
| ^
E:\Windows Kits\10\Include\10.0.22621.0\ucrt\string.h:531:20: note: 'strdup' has been explicitly marked deprecated here
531 | Check_return _CRT_NONSTDC_DEPRECATE(_strdup)
| ^
E:\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
428 | #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(
| ^
E:\Microsoft Visual Studio\Community\VC\Tools\MSVC\14.39.33519\include\vcruntime.h:345:47: note: expanded from macro
'_CRT_DEPRECATE_TEXT'
345 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
| ^
D:\Desktop\libcotp\src\utils\base32.c:174:25: warning: 'strdup' is deprecated: The POSIX name for this item is
deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details.
[-Wdeprecated-declarations]
174 | char *trimmed = strdup (user_data);
| ^
E:\Windows Kits\10\Include\10.0.22621.0\ucrt\string.h:531:20: note: 'strdup' has been explicitly marked deprecated here
531 | Check_return _CRT_NONSTDC_DEPRECATE(_strdup)
| ^
E:\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
428 | #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(
| ^
E:\Microsoft Visual Studio\Community\VC\Tools\MSVC\14.39.33519\include\vcruntime.h:345:47: note: expanded from macro
'_CRT_DEPRECATE_TEXT'
345 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
| ^
4 warnings generated.
[100%] Linking C static library cotp.lib
[100%] Built target cotp
from libcotp.
sorry, but non-linux environment are not supported!
from libcotp.
But I compiled it successfully(on windows) by mingw, clang and msvc. and here was no error when I used mingw(maybe it was because I replaced size_t with long long?)
from libcotp.
Related Issues (20)
- Is it compatible with Google Authenticator? HOT 5
- Add battle.net support HOT 1
- Add pkg-config file
- Add steam support
- Add support for 60s tokens
- License collision with libbaseencode HOT 6
- SOVERSION should be set manually HOT 1
- Add support for custom digits
- investigate potential regression in 1.2.0 HOT 4
- Exception running... HOT 4
- Tests should not need install to build
- No package 'baseencode' found HOT 2
- pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute HOT 4
- Tests are failing HOT 1
- error while building HOT 4
- Openssl support? HOT 5
- [macOS] build fails: `ld: unknown options: --no-add-needed --as-needed -z -z` HOT 7
- base32_encode returns an error when the leading byte is 0 HOT 2
- openssl 1.1 support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libcotp.