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

Building EASTL #497

Open
superwills opened this issue Dec 5, 2022 · 1 comment
Open

Building EASTL #497

superwills opened this issue Dec 5, 2022 · 1 comment

Comments

@superwills
Copy link

I experienced problems trying to build/link using the build downloaded by vcpkg

1>ConsoleApplication1.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned __int64,char const *,int,unsigned int,char const *,int)" (??_U@YAPEAX_KPEBDHI1H@Z)
1>ConsoleApplication1.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned __int64,unsigned __int64,unsigned __int64,char const *,int,unsigned int,char const *,int)" (??_U@YAPEAX_K00PEBDHI1H@Z)

I was able to compile & run from the github repo using @spacelg's steps, and do some testing from within the Test Suite. (Alternatively to @spacelg's step 7, you can open & build in Visual Studio).

Would it be a good idea to incorporate @spacelg's build steps into README.md?

I think it may be worth mentioning in the documentation that starting with the test suite is a great way to learn & get comfortable with EASTL.

@indigogem
Copy link

you need to override global new (and currently there is two types), consider to build EASTL and your proj with EASTL_USER_DEFINED_ALLOCATOR and implement custom allocator to be able also custom delete

void* __cdecl operator new[](size_t size, const char* name, int flags, unsigned debugFlags, const char* file, int line)
{
    return new uint8_t[size];
}

void* __cdecl operator new[](unsigned __int64 size, unsigned __int64 alignment, unsigned __int64 offset, char const* pName, int flags, unsigned int debugFlags, char const* file, int line)
{
    
    return new uint8_t[size];
}

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

No branches or pull requests

2 participants