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

Can't compile sources at /tests #1

Open
bsmelo opened this issue Nov 22, 2016 · 1 comment
Open

Can't compile sources at /tests #1

bsmelo opened this issue Nov 22, 2016 · 1 comment

Comments

@bsmelo
Copy link

bsmelo commented Nov 22, 2016

Hello!

First of all, I'm sorry if this is not the right place for this question/issue - since the lib is really new and all, I suppose there isn't another place though.

I can't compile the sources at /tests directory (I was able to compile and run the sample at /examples though).

First issue I found was:

[  5:16PM ]  [ bruno@lain:~/coap-apps/YaCoAP/tests(master✔) ]
 $ make
cc -std=c99 -Wall -Wextra -Werror -O2 -I../.   -c -o piggyback.o piggyback.c
piggyback.c: In function ‘handle_get_well_known_core’:
piggyback.c:22:48: error: ‘RIOT_BOARD’ undeclared (first use in this function)
                               (const uint8_t *)RIOT_BOARD, strlen(RIOT_BOARD),

So, I have to ask: is the lib dependent on RIOT-OS?

Anyway, I made an ugly hack of adding a #define RIOT_BOARD "native" inside piggyback.c and new errors just followed; so, I guess I'm doing something wrong. Are the directions at the README.md for just running make inside /tests complete/enough? Or should I do something like compiling the lib to get libyacoap.so and add its path to LD_LIBRARY_PATH or some other thing?

Thanks!

@smlng
Copy link
Member

smlng commented Nov 25, 2016

@bsmelo thanks for testing the code. I fixed the piggyback test, it was actually some copy/paste error - I use this library mostly for IoT projects with RIOT.

I have to admit that the build system is not at its best 😬 However, compiling examples and tests should work as they do not use the lib but integrate the required code directly.

Hope this helps ...

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