Turbo Link
[COLOR=blue]//unit1.cpp[/COLOR]
int foo() {return [COLOR=limegreen]0[/COLOR] ;}
[COLOR=blue]//daproga.cpp[/COLOR]
extern int foo();
int main() { return foo();}
[COLOR=green]Linker Error: Undefined symbol foo() in module daproga.cpp
[/COLOR]
Справка мне не помогла:(:
-------------------------------------------------
[COLOR=teal] Undefined symbol 'symbol' in module 'module'
The named symbol is referenced in the given module but is not defined
anywhere in the set of object files and libraries included in the link.
Check to make sure the symbol is spelled correctly.
You will usually see this error from TLINK for Turbo C++ symbols if
1) you did not properly match a symbol's declarations of pascal and cdecl
type in different source files, or
2) you have omitted the name of an .OBJ file your program needs, or
3) you did not link in the emulation library.
If you are linking C++ code with C modules, you might have forgotten to wrap
C external declarations in extern "C" {...}.
You might also have a case mismatch between two symbols.
-------------------------------------------------
[/COLOR]
По поводу 2го пункта справки: не понятно, где указывать имена связываемых объектных файлов?
Пробую в командной строке:
С:/TC/BIN>TCC daproga
[COLOR=teal]Turbo C++ Version 3.00 Copyright (c) 1992 Borland International
daproga.cpp:
Turbo Link Version 5.0 Copyright (c) 1992 Borland International
Error: Undefined symbol foo() in module daproga.cpp[/COLOR]
С:/TC/BIN>TCC unit1
[COLOR=teal]Turbo C++ Version 3.00 Copyright (c) 1992 Borland International
unit1.cpp:
Turbo Link Version 5.0 Copyright (c) 1992 Borland International
Error: Undefined symbol _main in module c0.ASM[/COLOR]С:/TC/BIN>TLINK unit1,daproga, daproga.exe[COLOR=teal]
Turbo Link Version 5.0 Copyright (c) 1992 Borland International
Warning: No stack[/COLOR]
Я смотрю ман по т-линку - там ключи всякие:
[COLOR=teal]Turbo Link Version 5.0 Copyright (c) 1992 Borland International
Syntax: TLINK objfiles, exefile, mapfile, libfiles
@xxxx indicates use response file xxxx
/m Map file with publics
/x No map file at all
/i Initialize all segments
/l Include source line numbers
/L Specify library search paths
/s Detailed map of segments
/n No default libraries
/d Warn if duplicate symbols in libraries
/c Case significant in symbols
/3 Enable 32-bit processing
/o Overlay switch
/v Full symbolic debug information
/ye Expanded memory swapping
/yx Extended memory swapping
/e Ignore Extended Dictionary
/t Create COM file
[/COLOR]
Может, в них дело?