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

alloca.h: No such file or directory #50

Closed
MyZeD opened this issue Mar 10, 2015 · 6 comments
Closed

alloca.h: No such file or directory #50

MyZeD opened this issue Mar 10, 2015 · 6 comments

Comments

@MyZeD
Copy link

MyZeD commented Mar 10, 2015

Compiling with MinGW produces the error:

alloca.h: No such file or directory

include/string.h:10 should be:

#if defined(WIN32) || defined(__WIN32) || defined(__WIN32__)
    #include <malloc.h>
#else
    #include <alloca.h>
#endif
@bkaradzic
Copy link
Owner

If you're changing build system add this to your include path:
https://github.com/bkaradzic/bx/tree/master/include/compat/mingw

@danylorudenko
Copy link

danylorudenko commented Oct 18, 2019

salieri.h and sal.h contain circular includes and compiler reaches include depth limit.
There is a chance I did not configure this right, since I have my own CMake setup and compiled shared bgfx separately.

Visual Studio 2017, btw.

@Angramme
Copy link

Angramme commented Dec 23, 2019

Same @danylorudenko I'm also trying to make a custom CMake setup with bgfx precompiled separetly. Using vs2017 too. I've got c1014 too many include files depth = 1024 which signifies a circular dependency somewhere but I really dont feel like going through each file and writing #pragma once everywhere

EDIT:
adding #pragma once to sal.h fixed it, but I've got load of other errors now

@crjenkins
Copy link

LOL what a joke. Still is an issue with visual studio and the cmake integration bgfx github. Why is nearly everything half-assed nowadays?

@bkaradzic
Copy link
Owner

@crjenkins What's your question here?

There are no issues with provided build system.

@Kurapikov
Copy link

@danylorudenko @Angramme @crjenkins
I met the same circular including problem.
But when I dipped through a bit, I fount MY problem is including "bx\include\compat\mingw" when using MSVC toolchain.
When I switched the include path to "bx\include\compat\msvc", everything works as-is.

Hope this memo will help someone later:
DON'T INCLUDE MINGW WHEN USING MSVC
:)

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

6 participants