I am having difficulty getting CGI and AWS to work together.
Any tips how exactly to do this?
I took an AWS sample project and the tried to copied in the cgi.c file from the CGI sample.
In my root.c project I have the following includes
#include
#include
When I include the cgi.c to be compiled I get the following errors. Any advice?
./sys/http/cgi.o: In function `RpUserExitInit':
cgi.c:(.text+0x0): multiple definition of `RpUserExitInit'
./cgi.o:cgi.c:(.text+0x0): first defined here
./sys/http/cgi.o: In function `RpUserExitDeInit':
cgi.c:(.text+0x20): multiple definition of `RpUserExitDeInit'
./cgi.o:cgi.c:(.text+0x20): first defined here
./sys/http/cgi.o: In function `RpExternalCgi':
cgi.c:(.text+0x38): multiple definition of `RpExternalCgi'
./cgi.o:cgi.c:(.text+0x138): first defined here
/usr/lib/gcc/arm-elf/4.2.0/../../../../arm-elf/bin/ld: Warning: size of symbol `RpExternalCgi' changed from 456 in ./cgi.o to 32 in ./sys/http/cgi.o
collect2: ld returned 1 exit status
make: *** [image.elf] Error 1
make: Target `all' not remade because of errors.
"When I include the cgi.c to be compiled I get the following errors. Any advice? "
Since you have a sys directory I will conclude that you created a NET+OS project as opposed to a NET+OS sample application. Further I will infur that in creating the project, you included HTTP as a service. From what I can see when you do this, the sys directory has a subdirectory called http. This http directory alrady contains a cgi.c file. If you also added a cgi.c file to the top level directory of your project, then you would get linker errors of multiple definitions as you describe in the earlier posting.
So either remove the cgi.c from the sys\http directory or better yet, instead of added cgi.c to your upper level directory, use the cgi.c in sys\http as your cgi.c