-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Adding include directories does not work (on Linux) #192
Comments
I think the problem is the extra space after -I . |
I tested on Windows. C:\Users\thiag\source\repos\SDL\test>cake -IC:\Users\thiag\source\repos\SDL\include testsprite.c
Cake 0.9.10
C:/Users/thiag/source/repos/SDL/test/testsprite.c
1 files in 1.41 seconds
0 errors 0 warnings 0 notes It worked. |
I'm running the tests on Linux. After running I get the following behavior:
|
I need more time to check . The problems seams to be on Uint64, Uint8 etc..definition. It may be that the code that declares Uint64 is checking for some compiler specific stuff. |
(I never checked SDL code before, but it can be included for tests) |
-E also may be useful because it can shows how Uint64 was defined cl -IC:\Users\thiag\source\repos\SDL\include testsprite.c -E |
On gcc, SDL uses the libc types from I attached the output of |
Found the problem typedef long unsigned int uint64_t;
_Static_assert(sizeof(uint64_t) == 8, "");
int main(){} The sizeof "long unsigned int" is different from gcc. |
This problem has been fixed. typedef long unsigned int uint64_t;
_Static_assert(sizeof(uint64_t) == 8, "");
int main(){} |
Indeed! Very nice! I still see the |
One of the reasons I'm looking into cake is for this. |
It took me a while. (added cake to linux path was new to me etc)
|
The main motivation for target < C99 was to be compatible with C++ 98. |
I suppose c++98 would be fine as well, as long as the public interface is a C interface. Nice! I see an issue with I don't know why, but I still see the |
Building with |
The
create a new main function that call test functions that are under |
While experimenting with cake, I tried to transpile a few sources from SDL2.
But adding
-I <include-folder>
appears to not work.Copying all SDL headers to the test folder allows cake to start (but fail later):
The text was updated successfully, but these errors were encountered: