babelouest / orcania

Potluck with different functions for different purposes that can be shared among C programs
https://babelouest.github.io/orcania/
GNU Lesser General Public License v2.1
11 stars 12 forks source link

Building Orcania on windows throws errors #35

Open vijayparmar1992 opened 2 months ago

vijayparmar1992 commented 2 months ago

@babelouest I am trying to build Orcania for windows for windows. I was able to generate orcania.sln. However, while building I got error related to can't find header file #include , which I resolved by downling getopr from here http://ieng6.ucsd.edu/~cs12x/vc08install/vc08install2.html

However, now I am getting below errors 5>C:\Users\VijayParmar\Downloads\binaries\orcania-2.3.3\build\Release\base64url.exe : fatal error LNK1120: 2 unresolved externals

Rebuild started... 1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Release x64 ------ 1>1>Checking Build System 2>------ Rebuild All started: Project: orcania, Configuration: Release x64 ------ 3>------ Skipped Rebuild All: Project: dist_o, Configuration: Release x64 ------ 3>Project not selected to build for this solution configuration 4>------ Skipped Rebuild All: Project: uninstall, Configuration: Release x64 ------ 4>Project not selected to build for this solution configuration 2>Building Custom Rule C:/Users/VijayParmar/Downloads/binaries/orcania-2.3.3/CMakeLists.txt 2>base64.c 2>memory.c 2>orcania.c 2>C:\Users\VijayParmar\Downloads\binaries\orcania-2.3.3\src\orcania.c(200,18): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 2>C:\Users\VijayParmar\Downloads\binaries\orcania-2.3.3\src\orcania.c(208,12): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 2>C:\Users\VijayParmar\Downloads\binaries\orcania-2.3.3\src\orcania.c(315,10): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strnicmp. See online help for details. 2>Generating Code... 2>Auto build dll exports 2> Creating library C:/Users/VijayParmar/Downloads/binaries/orcania-2.3.3/build/Release/orcania.lib and object C:/Users/VijayParmar/Downloads/binaries/orcania-2.3.3/build/Release/orcania.exp 2>orcania.vcxproj -> C:\Users\VijayParmar\Downloads\binaries\orcania-2.3.3\build\Release\orcania-2.dll 2>Done building project "orcania.vcxproj". 5>------ Rebuild All started: Project: base64url, Configuration: Release x64 ------ 5>Building Custom Rule C:/Users/VijayParmar/Downloads/binaries/orcania-2.3.3/CMakeLists.txt 5>base64url.c 5>C:\Users\VijayParmar\Downloads\binaries\orcania-2.3.3\tools\base64url\base64url.c(89,7): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 5>C:\Users\VijayParmar\Downloads\binaries\orcania-2.3.3\tools\base64url\base64url.c(114,25): warning C4996: 'read': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _read. See online help for details. 5>base64url.obj : error LNK2019: unresolved external symbol getopt_long referenced in function main 5>base64url.obj : error LNK2019: unresolved external symbol optarg referenced in function main 5>C:\Users\VijayParmar\Downloads\binaries\orcania-2.3.3\build\Release\base64url.exe : fatal error LNK1120: 2 unresolved externals 5>Done building project "base64url.vcxproj" -- FAILED. 6>------ Rebuild All started: Project: ALL_BUILD, Configuration: Release x64 ------ 6>Building Custom Rule C:/Users/VijayParmar/Downloads/binaries/orcania-2.3.3/CMakeLists.txt 7>------ Skipped Rebuild All: Project: INSTALL, Configuration: Release x64 ------ 7>Project not selected to build for this solution configuration 8>------ Skipped Rebuild All: Project: PACKAGE, Configuration: Release x64 ------ 8>Project not selected to build for this solution configuration ========== Rebuild All: 3 succeeded, 1 failed, 4 skipped ========== image

babelouest commented 2 months ago

Hello,

Unfortunately I don't know much about building on windows, but the getopt features are used in base64url binary, so if you don't need it, you can disable its build with the cmake option BUILD_BASE64URL:

$ cmake -DBUILD_BASE64URL=off