473,396 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

using 2 source code

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
Jul 31 '06 #1
8 1885
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.
Jul 31 '06 #2
erm, is there a simpler way? I just started programming.
Jul 31 '06 #3
erm, 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.
Jul 31 '06 #4
Banfa
9,065 Expert Mod 8TB
Or just put both source files in your project, i.e. compile them both and link them together.
Jul 31 '06 #5
thanks, but how do u link them together?
Aug 1 '06 #6
Banfa
9,065 Expert Mod 8TB
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 flags
Aug 2 '06 #7
Hey Banfa can you eleborate this
Suppose I am using Turbo C++ then what exactly I should use in through command line
Thanks in advance
Aug 11 '06 #8
Banfa
9,065 Expert Mod 8TB
I can not tell you because I have never used Turbo C++

Check you documentation it should tell you.
Aug 11 '06 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: George | last post by:
Hi, I am trying to write a query in Oracle which I have not done before, and are having some difficulty getting my result. Please check my query and my results. select max(note.datetime),...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
6
by: Ramon M. Felciano | last post by:
Helo all -- I'm trying to gain a deeper understand for what type of semi-declarative programming can be done through XML and XPath/XSLT. I'm looking at graph processing problems as a testbed for...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
9
by: Colin McGuire | last post by:
Hi, I have an report in Microsoft Access and it displays everything in the table. One column called "DECISION" in the table has either 1,2, or 3 in it. On my report it displays 1, 2, or 3. I want...
47
by: Bonj | last post by:
I downloaded the gzlib library from zlib in order to do compression. (http://www.gzip.org/zlib) The prototype of the compression function seems to be int compress (Bytef *dest, uLongf *destLen,...
1
by: kingster | last post by:
Hi, I have a regular dataset and all i want to do is make a pivot table display in a browser with the datasource of the pivot table to be this dataset and then the end-user will be able to do...
0
by: none | last post by:
I have followed http://java.sun.com/j2se/1.4.2/docs/guide/idl/GShome.html to build a corba application. When i run the orb, server and client on the same machine it works fine. When i follow...
0
by: choukse | last post by:
Hi All, I am trying to bind to ADAM instance with a windows user through JNDI and it keeps failing. My ADAM and AD is running on same Windows 2k3 server. But, through LDP I am able to bind with...
0
by: rajasankar | last post by:
Hi, I am using Jython based application and trying to use inspect.py in the python files. Here is my code import inspect,os,sys,pprint,imp def handle_stackframe_without_leak(getframe): ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.