我下/用户这3个文件/ koraytugay为什么我不能编译我的C代码?
checksum.h
enc.h
libsec.a
libsec.a是现有checksum.o的存档文件和enc.o
Korays-MacBook-Pro:~ koraytugay$ nm libsec.a
libsec.a(enc.o):
0000000000000090 s EH_frame0
0000000000000000 T _enc
00000000000000a8 S _enc.eh
U _strlen
libsec.a(checksum.o):
0000000000000078 s EH_frame0
0000000000000000 T _checkSumFor
0000000000000090 S _checkSumFor.eh
Korays-MacBook-Pro:~ koraytugay
这是我尝试编译我的hello.c文件:
Korays-MacBook-Pro:HelloWorld koraytugay$ gcc hello.c -L/Users/koraytugay -libsec -o koko.out
hello.c:4:10: fatal error: 'enc.h' file not found
#include <enc.h>
^
1 error generated.
我在做什么错?
顺便说一句,hello.c中:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <enc.h>
#include <checksum.h>
// code here..
我_think_这是因为编译器无法找到名为'enc.h'的文件... –
Err ...没有提供有效的enc.h路径? –
了解include <>和include“”之间的区别。 enc.h和checksum.h应该包含“”。 – cup