-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(llgo/doc) : Add a document named "LLGO Migration for C/C++ Third-Party Libraries" #532
docs(llgo/doc) : Add a document named "LLGO Migration for C/C++ Third-Party Libraries" #532
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #532 +/- ##
=======================================
Coverage 97.71% 97.72%
=======================================
Files 19 19
Lines 4511 4523 +12
=======================================
+ Hits 4408 4420 +12
Misses 87 87
Partials 16 16 ☔ View full report in Codecov by Sentry. |
@@ -0,0 +1,461 @@ | |||
# LLGO Migration for C/C++ Third-Party Libraries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use space in filename
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified to llgo_migration_for_c_c++_third-party_libraries
brew install inih | ||
``` | ||
|
||
### Compiling from Source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends. There is no need to describe how to install from source code, just prompt to prioritize binary installation unless the package you want to support is not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some people need to compile and install from source code, such as those who migrate godot
|
||
```bash | ||
cd inih/_demo/inih_demo | ||
llgo run inih_demo.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
llgo run .
is better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code updated
```bash | ||
cd inih/_demo/inih_demo | ||
llgo run inih_demo.go | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't leave blank line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code updated
BLEND_ALPHA_PREMULTIPLY, // Blend premultiplied textures considering alpha | ||
BLEND_CUSTOM, // Blend textures using custom src/dst factors (use rlSetBlendFactors()) | ||
BLEND_CUSTOM_SEPARATE // Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate()) | ||
} BlendMode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code updated
//llgo:type C | ||
type Comp func(a c.Int) | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be need more detail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details added
|
||
### Handling char ** Type in C | ||
|
||
Handle char ** as `[]*c.Char` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code updated
clang++ -dynamiclib x.cpp -o {users third-party libraries path}/lib/libbar.dylib -lfmt -std=c++11 | ||
# Generate pc for the corresponding dylib | ||
# Install via `https://github.com/hackerchai/dylib-installer` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these blank lines need to be trimmed.
```jsx | ||
0000000000003e55 T _ini_parse | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The end of a code block (```
) should be followed by a blank line.
├──inih_demo.go | ||
├── INIReader_demo | ||
├──reader_demo.go | ||
├── _wrap/cpp_wrap.cpp (optional) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't name it _wrap/cpp_wrap.cpp
, naming it _wrap/reader.cpp
is better.
No description provided.