assyrianic / harbol Goto Github PK
View Code? Open in Web Editor NEWHarbol is a collection of data structure and miscellaneous libraries, similar in nature to C++'s Boost, STL, and GNOME's GLib but for C99+
License: Apache License 2.0
Harbol is a collection of data structure and miscellaneous libraries, similar in nature to C++'s Boost, STL, and GNOME's GLib but for C99+
License: Apache License 2.0
Architecture: Tested on both x86 & x64
OS: Windows
IDE: Visual Studio 2022
C++ Standard: 14
A number of compile errors are thrown when attempting to compile a C++ source file that includes both harbol_common_defines.h and a standard STL header.
I have located the erroneous macros:
Harbol/harbol_common_defines.h
Line 329 in 883313f
Harbol/harbol_common_defines.h
Line 341 in 883313f
The interfering _CRTRESTRICT macro of corecrt.h:
#define _CRTRESTRICT __declspec(restrict)
By defining _CRT_SUPPRESS_RESTRICT the macro will be excluded from the build, a possible solution. However, I am unsure if it would break compatibility with other libraries.
In regards to inlining, the C++ standard library forbids macroizing the keyword "inline," according to xkeycheck.h:
#if defined(inline) #define inline EMIT WARNING C4005 #error The C++ Standard Library forbids macroizing the keyword "inline". \ Enable warning C4005 to find the forbidden define. #endif // inline
When pointers go out of scope the vector/any other data structure don't work...
Example:
#include "harbol.h"
void whee(struct HarbolVector vec)
{
harbol_vector_insert(&vec, &(float32_t){2.f});
harbol_vector_insert(&vec, &(float32_t){3.f});
harbol_vector_insert(&vec, &(float32_t){4.f});
}
int main(void)
{
struct HarbolVector vec = harbol_vector_create(sizeof(float32_t),1);
whee(vec);
printf("%f %f %f\n", harbol_vector_get(&vec,0), harbol_vector_get(&vec,1), harbol_vector_get(&vec,2));
}
$ make static
...[compiling]
$ ls libharbol.a
libharbol.a
$ gcc -o harbol_vector_func_test harbol_vector_func_test.c libharbol.a
$ ./harbol_vector_func_test
0.000000 0.000000 0.000000
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.