#1 Header style library

닫힘
acetone2 년 전을 오픈 · 7개의 코멘트
acetone 코멘트됨, 2 년 전

Hi. Can you turn library to headers-only style or explain me how I can do this shortly? I trying do this one hour and now go crazy with much C errors and infinity streams of undefined :)

I want use this cute library like a header in C++ projects.

Hi. Can you turn library to headers-only style or explain me how I can do this shortly? I trying do this one hour and now go crazy with much C errors and infinity streams of `undefined` :) I want use this cute library like a header in C++ projects.
g0tsu 코멘트됨, 2 년 전
소유자

Hi !

Yeah, it is not a trivial task. Please check out the make-singleh.sh script which creates a huge libcaptcha.h.

Thanks.

Hi ! Yeah, it is not a trivial task. Please check out the `make-singleh.sh` script which creates a huge `libcaptcha.h`. Thanks.
acetone 코멘트됨, 2 년 전
포스터

Thanks for answer, lets try!

make-singleh.sh push the error: headers.h not found (line 45)

If I remove this name from file and start script again, I see many error like this:

../libcaptcha.h:3694:51: error: ‘o1’ undeclared (first use in this function); did you mean ‘y1’?
          _mm_storeu_si128((__m128i *) (out + 16), o1);
                                                   ^~
                                                   y1
In file included from example1.c:2:
../libcaptcha.h: In function ‘lc_randomize_arr_rotation’:
../libcaptcha.h:18424:5: warning: ‘lc_rotate_glyph’ is deprecated [-Wdeprecated-declarations]
     narr->items[i] = lc_rotate_glyph(arr->items[i], angle);
     ^~~~
../libcaptcha.h:17546:15: note: declared here
 lc_bmpGlyph * lc_rotate_glyph(lc_bmpGlyph *glyph, int angle);
               ^~~~~~~~~~~~~~~

What shoud I do, master? :)

Thanks for answer, lets try! make-singleh.sh push the error: `headers.h` not found (line 45) If I remove this name from file and start script again, I see many error like this: ``` ../libcaptcha.h:3694:51: error: ‘o1’ undeclared (first use in this function); did you mean ‘y1’? _mm_storeu_si128((__m128i *) (out + 16), o1); ^~ y1 In file included from example1.c:2: ../libcaptcha.h: In function ‘lc_randomize_arr_rotation’: ../libcaptcha.h:18424:5: warning: ‘lc_rotate_glyph’ is deprecated [-Wdeprecated-declarations] narr->items[i] = lc_rotate_glyph(arr->items[i], angle); ^~~~ ../libcaptcha.h:17546:15: note: declared here lc_bmpGlyph * lc_rotate_glyph(lc_bmpGlyph *glyph, int angle); ^~~~~~~~~~~~~~~ ``` What shoud I do, master? :)
g0tsu 코멘트됨, 2 년 전
소유자

You're right. It is my fault, I've forgottent to remove the headers.h from the script (it was kinda home for all of those #includes before I moved them into the script). Sorry for this.

The changes:

95bcc8d0d3

You're right. It is my fault, I've forgottent to remove the `headers.h` from the script (it was kinda home for all of those `#includes` before I moved them into the script). Sorry for this. The changes: https://notabug.org/g0tsu/libcaptcha/commit/95bcc8d0d3e565fd7e003cbe1ec4e4c572598658
acetone 코멘트됨, 2 년 전
포스터

Thanks. Now a have many errors with undefined types at final step:

cc example1.c -I../ -lm -o shtest

Error like this:

./libcaptcha.h: In function ‘stbi__idct_simd’:
../libcaptcha.h:2503:4: error: unknown type name ‘__m128i’; did you mean ‘__int128’?
    __m128i row0, row1, row2, row3, row4, row5, row6, row7;
    ^~~~~~~
    __int128
../libcaptcha.h:2504:4: error: unknown type name ‘__m128i’; did you mean ‘__int128’?
    __m128i tmp;
    ^~~~~~~
    __int128

Full output: https://paste.i2pd.xyz/?8b9bef12a860db83#8mVBwUnedF2JJPn7ZCg5NYtYKa5fRKu8nTH2Cjgw9PuG

I googling somethink like that, but not understand what should I do)

Thanks. Now a have many errors with undefined types at final step: ```bash cc example1.c -I../ -lm -o shtest ``` Error like this: ```bash ./libcaptcha.h: In function ‘stbi__idct_simd’: ../libcaptcha.h:2503:4: error: unknown type name ‘__m128i’; did you mean ‘__int128’? __m128i row0, row1, row2, row3, row4, row5, row6, row7; ^~~~~~~ __int128 ../libcaptcha.h:2504:4: error: unknown type name ‘__m128i’; did you mean ‘__int128’? __m128i tmp; ^~~~~~~ __int128 ``` Full output: https://paste.i2pd.xyz/?8b9bef12a860db83#8mVBwUnedF2JJPn7ZCg5NYtYKa5fRKu8nTH2Cjgw9PuG I googling somethink like [that](https://stackoverflow.com/questions/11571514/strange-error-during-cast-to-m128i), but not understand what should I do)
g0tsu 코멘트됨, 2 년 전
소유자

Yeah, looks like missing emmintrin.h , will add a bit later, but you can do it manually.

Yeah, looks like missing `emmintrin.h` , will add a bit later, but you can do it manually.
acetone 코멘트됨, 2 년 전
포스터

Oh thanks! You can merge it: https://notabug.org/g0tsu/libcaptcha/pulls/2

Let me try compile some example file...

Fine. It's compiled. In begin I have bit issue because forget -lm flag :)

Oh thanks! You can merge it: https://notabug.org/g0tsu/libcaptcha/pulls/2 Let me try compile some example file... Fine. It's compiled. In begin I have bit issue because forget `-lm` flag :)
acetone 코멘트됨, 2 년 전
포스터

Thank you so much for fast response, man!

Thank you so much for fast response, man!
로그인하여 이 대화에 참여
레이블 없음
마일스톤 없음
담당자 없음
참여자 2명
로딩중...
취소
저장
아직 콘텐츠가 없습니다.