Please, I need some help to do a small task. Here it is:
I need to use a function, for example puts, in a program, but without including stdio.h. Then I must call this function from main(). My problem, it's that I don't know exactly what libraries and obj files uses puts(), to properly link them. the cpp is:
//file.cpp
int puts(const char*__s);
int main()
{
puts("hello");
return 0;
}
Now, in DOS shell, I type(I'm using borland c++ 5.02):
bcc32 file.cpp c0x32.obj import32.lib cw32i.lib
and I get some errors. Please someone help me. What to type, what command to give, what are the libraries. Thanks in advance
Ok thanks, I'll try it!
[EDIT] I tried, but when i type this : g++ -o main.exe main. o, I receive the following error:g++ instalation problem,cannot exec 'ld':Invalid Argument