C library

Hi,

I created the program only from the standard library, this program is a multiplatform? (win, linux)
Or is it also depends on the compiler?
Sorry for my English
thx
the source code should be, the binary will not.
AFAIK you need to recompile it for each platform.

regards
- dean
from my knowledge it should be. If you used only the std lib, and no operating sys files like <windows> or sys
Really? When I call malloc, how the program will know what to call? api from the win (WinAPI) or Linux (POSIX)

my english is bad
thats why you use new, plus malloc should be platform independant. Just recompile for each platform
As it was already said you shall recompile your program for any planform.
As you know, you have to compile your program, then link it. When the compiler encounters something like malloc(), it passes the symbols on to the linker. The linker will find the symbols you need and link them in, provided your make file is configured properly.
The compiler you downloaded included all of the std libraries.
Last edited on
ok I thank all
Topic archived. No new replies allowed.