Hi, may i know how do you include 2 source code together? I'm want to use the function in that code to be used in the main function in the other source code. thanks. :D
using 2 source code
Collapse
X
-
Hi,
U can use .dll file for this. create .dll file with the function u want and call that fuction from which ever function u want. Using .dll will also save ur code size from being bulky.
regards,
Ashish. -
Originally posted by tpybearerm, is there a simpler way? I just started programming.
Hi,
There is a simpler way also. U can create .lib file (static library file), this u can create in the same way as u create a project just by selecting static library option instead of project. Here instead of .exe, a .lib file will be created. This .lib can be included in any other project and the function written in .lib can be called from the project in which u have included it. Hope this will be possible for u.
regards,
Ashish.Comment
-
Suppose the files are
File1.c
File2.c
Then you would issue the commands
cc File1.c
cc File2.c
link File1.obj File2.obj
Where
cc = the name of your compiler program plus any required flags
link = the name of your linker program plus and required flagsComment
-
Hey Banfa can you eleborate this
Suppose I am using Turbo C++ then what exactly I should use in through command line
Thanks in advanceComment
Comment