Ok, I think I know what I'm doing wrong. I'm triyng to compile the file only and not the project.
I have created a new project and include my tranfer.cpp source in it....now I'm having new errors...
main.cpp: In function `bool ConnectAndSend(char*, char*, long int)':
main.cpp:220: error: expected primary-expression before "long"
main.cpp:220: error: integer constant is too large for "long" type
main.cpp: In function `void WaitForIncomming()':
main.cpp:270: warning: converting of negative value `-0x000000001' to `SOCKET'
main.cpp: In function `long long int GetFilesize(char*)':
main.cpp:348: warning: passing NULL used for non-pointer converting 3 of `void* CreateFileA(const CHAR*, DWORD, DWORD, _SECURITY_ATTRIBUTES*, DWORD, DWORD, void*)'
main.cpp:348: warning: passing NULL used for non-pointer converting 6 of `void* CreateFileA(const CHAR*, DWORD, DWORD, _SECURITY_ATTRIBUTES*, DWORD, DWORD, void*)'
main.cpp:352: error: expected primary-expression before "long"
main.cpp:352: error: expected `;' before "long"
main.cpp:352: error: expected primary-expression before "long"
main.cpp:352: error: expected `;' before "long"
main.cpp:356: error: `GetFileSizeEx' undeclared (first use this function)
main.cpp:356: error: (Each undeclared identifier is reported only once for each function it appears in.)
main.cpp:360: error: expected primary-expression before "long"
main.cpp:360: error: expected `;' before "long"
main.cpp:360: error: expected primary-expression before "long"
main.cpp:360: error: expected `;' before "long"
main.cpp:364: error: expected primary-expression before "long"
main.cpp:364: error: expected `;' before "long"
main.cpp:364: error: expected primary-expression before "long"
main.cpp:364: error: expected `;' before "long"
Process terminated with status 1 (0 minutes, 1 seconds)
16 errors, 3 warnings
I've set the option for the compiler (Enable Settings -> Compiler -> Other -> Compiler Logging: Full command line).
Normally, when I compile a .cpp source with the Borland Compiler, I simply....
C:\Borland\BCC55\Projects>bcc32 transfer.cpp <------------------This is the command line I use to compile my programs (bcc32.exe)
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
transfer.cpp:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
...and everything is fine. No errors and .exe is created.
I tried to modify the macros in the "Advanced Compiler Options" so it only use $compiler $file....same thing going on.
Escuse me if I don't elaborate more....bcc32.exe does the job for me I guess (compiling + linking).