User forums > Embedded development
Create and compile Contiki project
scarphin:
Have you used correct paths for the header files in YOUR source file?
Pavel_47:
Here is "header part" of my source:
--- Code: ---#include "contiki.h"
#include "lib/random.h"
#include "sys/ctimer.h"
#include "net/uip.h"
#include "net/uip-ds6.h"
#include "net/uip-udp-packet.h"
#include "sys/ctimer.h"
--- End code ---
I think that they are correct otherwise there were errors, related to non-identified headers.
But there is no such errors.
Other argument: in another example, that is succesfully built and works, I also use #include "contiki.h".
As you can state, there is no path prefix before contiki.h despite of fact that contiki.h is situated upper in hierarchy than source and project files (also contiki.h isn't in the root directory of disc "C").
Also as I already told, .c file that contains functions (those that provoked built errors) is compiled ... I see corresponding object (.o file).
If my comprehension is correct - compiled file cannot be linked for some reason. Isn't it ?
Cordially
Pavel.
scarphin:
Ok then, did you also insert your 'source.o' file into the linker settings in the makefile?
Pavel_47:
Hello Scarphin,
There is no any settings, related to ".o" files inside makefile. A propos, here it is:
--- Code: ---DEFINES+=PROJECT_CONF_H=\"project-conf.h\"
CONTIKI_PROJECT = my_udp_client
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
include $(CONTIKI)/Makefile.include
--- End code ---
The "obj subfolder" (where all .o files are stocked) contains 293 items.
Among them there is .o file, where there are functions, that cannot be linked (those that provoke "undefined reference" errors).
The question that arises - what is particular in these functions, that they cannot be linked, while others (from other .o files) - YES.
Regards
Pavel.
scarphin:
As far as I know one must add his/her object '.o' files to the makefile for linkage. You have to consult makefile documentation to be sure.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version