热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

NotcompilingonWindows

WhentryingtocompilethelibraryonWindowstogetthesharedobjectlibrary,Igetth

When trying to compile the library on Windows to get the shared object library, I get the following when running make all:

1
2
3
4
5
6
7
8
9
10
11
12
13
process_begin: CreateProcess(NULL, sh -c "uname -s 2>/dev/null || echo false", .

..) failed.

cc -c -fPIC -std=c89 -pedantic -Wall -Werror -Wstrict-prototypes -Wwrite-strings

 -Wshadow -Winit-self -Wcast-align -Wformat=2 -Wmissing-prototypes -Wstrict-over

flow=2 -Wcast-qual -Wc++-compat -Wundef -Wswitch-default -Wconversion -fstack-pr

otector-strong  cJSON.c

process_begin: CreateProcess(NULL, cc -c -fPIC -std=c89 -pedantic -Wall -Werror

-Wstrict-prototypes -Wwrite-strings -Wshadow -Winit-self -Wcast-align -Wformat=2

 -Wmissing-prototypes -Wstrict-overflow=2 -Wcast-qual -Wc++-compat -Wundef -Wswi

tch-default -Wconversion -fstack-protector-strong cJSON.c, ...) failed.

make (e=2): The system cannot find the file specified.

Makefile:68: recipe for target 'cJSON.o' failed

mingw32-make: *** [cJSON.o] Error 2

And the following with "cmake .." while in a subdir.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
CMake Error at CMakeLists.txt:6 (project):

  The CMAKE_C_COMPILER:



    cl



  is not a full path and was not found in the PATH.



  To use the NMake generator with Visual C++, cmake must be run from a shell

  that can use the compiler cl from the command line.  This environment is

  unable to invoke the cl compiler.  To fix this problem, run cmake from the

  Visual Studio Command Prompt (vcvarsall.bat).



  Tell CMake where to find the compiler by setting either the environment

  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to

  the compiler, or to the compiler name if it is in the PATH.





-- Configuring incomplete, errors occurred!

See also "C:/Users/Mattia/Downloads/cJSON-master/build/CMakeFiles/CMakeOutput.lo

g".

See also "C:/Users/Mattia/Downloads/cJSON-master/build/CMakeFiles/CMakeError.log

".

I'm using mingw as compiler.

该提问来源于开源项目:DaveGamble/cJSON

Closing this because of missing response from the original reporter. (and the second issue has been solved).


推荐阅读
author-avatar
张明怡紫茂佳尧
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有