Skip to content
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

TinySTL attempt 3. #342

Merged
merged 8 commits into from
Feb 1, 2025
Merged

TinySTL attempt 3. #342

merged 8 commits into from
Feb 1, 2025

Conversation

mcourteaux
Copy link
Contributor

@mcourteaux mcourteaux commented Jan 30, 2025

No warnings now in the MSVC build log on the Github CI bots.

include/tinystl/string.h Outdated Show resolved Hide resolved
include/tinystl/string.h Outdated Show resolved Hide resolved
@mcourteaux mcourteaux requested a review from bkaradzic January 31, 2025 17:10
@bkaradzic bkaradzic merged commit 5fb8c15 into bkaradzic:master Feb 1, 2025
3 of 9 checks passed
@nathan-stouffer-onx
Copy link

I am getting compile errors for wasm in bgfx and I believe this PR is the source. I am getting some undefined errors for identifiers

==== Building bx (debug) ====
==== Building bgfx (debug) ====
==== Building bimg (debug) ====
==== Building bimg_decode (debug) ====
glcontext_html5.cpp
../../../src/glcontext_html5.cpp:34:45: error: use of undeclared identifier 'strlen'; did you mean 'bx::strLen'?
   34 |                         m_canvas = (char*)bx::alloc(g_allocator, strlen(_canvas) + 1);
      |                                                                  ^~~~~~
      |                                                                  bx::strLen
../../../../bx/include/bx/string.h:265:10: note: 'bx::strLen' declared here
  265 |         int32_t strLen(const char* _str, int32_t _max = INT32_MAX);
      |                 ^
../../../src/glcontext_html5.cpp:35:4: error: use of undeclared identifier 'strcpy'
   35 |                         strcpy(m_canvas, _canvas);
      |                         ^
2 errors generated.
make[2]: *** [../../wasm/obj/Debug/bgfx/src/glcontext_html5.o] Error 1
make[1]: *** [bgfx] Error 2
make: *** [wasm-debug] Error 2

@mcourteaux
Copy link
Contributor Author

This compilation error simply reveals that glcontext_html5.cpp was not properly using bx functions, but instead libc-functions. You can make a PR in bgfx repo to fix this.

strlen => bx::strLen
strcpy => bx::strCopy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants