Giter VIP home page Giter VIP logo

Comments (3)

chen-tk avatar chen-tk commented on May 30, 2024

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.

paolostivanin avatar paolostivanin commented on May 30, 2024

sorry, but non-linux environment are not supported!

from libcotp.

chen-tk avatar chen-tk commented on May 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.