天嵌 ARM开发社区

 找回密码
 注册
查看: 2252|回复: 1

《Linux移植Step by Step》附录2中helloweb.c编译的问题

[复制链接]
不言DXH 发表于 2011-11-17 12:47:51 | 显示全部楼层 |阅读模式
下面是helloweb.c的源码:
#include <stdio.h>
main() {
        printf("Content-type:text/html\n\n");
        printf("<html>\n");
        printf("<head><title>CGI Output</title></head>\n");
        printf("<body>\n");
        printf("<h1>Hello,Web Server</h1>\n");
        printf("Your form submission was captured for use in\n");
        printf("debugging CGI code.\n");
        printf("<body>\n");
        printf("</html>\n");
        exit(0);
}
天嵌的编译方法是:
arm-linux-gcc -o helloweb.cgi helloweb.c
我试过好多次都不行,后来我看cgic205中的Makefile我发现应该将上述编译命令改为:
arm-linux-gcc -o helloweb.cgi helloweb.c -L./ -lcgic
亚瑟王 发表于 2011-11-28 16:00:06 | 显示全部楼层
你编译的时候出什么错了呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-7-5 04:59 , Processed in 1.031250 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表