Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

fix gcc compile error: use option -std=c99 or -std=gnu99 to compile your…#9

Open
taomaree wants to merge 1 commit into
guanzhi:mainfrom
taomaree:fix_c99
Open

fix gcc compile error: use option -std=c99 or -std=gnu99 to compile your…#9
taomaree wants to merge 1 commit into
guanzhi:mainfrom
taomaree:fix_c99

Conversation

@taomaree

Copy link
Copy Markdown

fix gcc compile error below, add compile option -std=cc99.

src/des.c: In function 'permute':
src/des.c:188:2: error: 'for' loop initial declarations are only allowed in C99 mode
  for (size_t i = 0; i < n; i++) {
  ^
src/des.c:188:2: note: use option -std=c99 or -std=gnu99 to compile your code
make[2]: *** [CMakeFiles/gmssl.dir/build.make:588: CMakeFiles/gmssl.dir/src/des.c.o] Error 1

@Baymini-zx

Copy link
Copy Markdown

CMakeLists.txt里面增加add_definitions(-std=c99)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants