вот сейчас проверил:
создал 4 файла
client.h
C++ |
1
2
3
4
5
6
7
| #ifndef GUARD_Client_h
#define GUARD_Client_h
extern int myfunc(int i);
extern int myfunc2(int i);
#endif |
|
test1.cpp
C++ |
1
2
3
4
| int myfunc(int i)
{
return i;
} |
|
test2.cpp
C++ |
1
2
3
4
5
6
7
8
| #include "client.h"
int main()
{
int a = myfunc(1);
a = myfunc2(1);
return 0;
} |
|
test3.cpp
C++ |
1
2
3
4
5
6
| #include "client.h"
int myfunc2(int i)
{
return myfunc(1);
} |
|
как и ожидалось всё компилируется, ни на что не ругается, кроме возмущения, что "a" нигде не используется