#1 Header style library

Kapalı
acetone tarafından 2 yıl önce kere açıldı · 7 yorum
acetone 2 yıl önce olarak yorumlandı

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 yıl önce olarak yorumlandı
Sahibi

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 yıl önce olarak yorumlandı
Poster

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 yıl önce olarak yorumlandı
Sahibi

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 yıl önce olarak yorumlandı
Poster

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 yıl önce olarak yorumlandı
Sahibi

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 yıl önce olarak yorumlandı
Poster

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 yıl önce olarak yorumlandı
Poster

Thank you so much for fast response, man!

Thank you so much for fast response, man!
Giriş yap bu konuşmaya katılmak için.
Etiket Yok
Kilometre Taşı Yok
Atanan Kişi Yok
2 Katılımcı
Yükleniyor...
İptal
Kaydet
Henüz bir içerik yok.