473,320 Members | 1,945 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,320 software developers and data experts.

Linking C programs...

is there a way of linking two or more C programs... if there is a way
how is it done..... i want to know how linking is done.. please help.

Jan 30 '06 #1
14 1773
nringty wrote:
is there a way of linking two or more C programs... if there is a way
how is it done..... i want to know how linking is done.. please help.

The question is strange. Can you give more details?
I think the question is off-topic here, but you should be
a little more clear when asking questions.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jan 30 '06 #2
what i want to do is join two programs together... i know it can be
done but im not sure how.

Jan 30 '06 #3
nringty wrote:
what i want to do is join two programs together... i know it can be
done but im not sure how.


Do you have two C sources and want to compile them together?

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jan 30 '06 #4
this is what i want ..u open one source and from that source.... u can
open other sources.

Jan 30 '06 #5
after compiling and viewing the program.

Jan 30 '06 #6
nringty wrote:
this is what i want ..u open one source and from that source.... u can
open other sources.

Please quote context when replying. Other people are seeing this
and you have to let them know what you are talking about.

Are you sure you're talking about different sources or already
compiled applications?

Tell me if this is right:

You have a file called p1.c and you compile it to p1.exe.
You have another file called p2.c and you compile it to
p2.exe.
Now you execute p1.exe and you want it to execute p2.exe?
If yes, the you can use the "system" function that you can find in
stdlib.h.
How you use the function depends on the implementation.

Different OSes give you the exec family of functions for more control.
There's also the option of creating dynamically linked libraries.
However, these are way off-topic here as they depend heavily on
your system.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jan 30 '06 #7
nringty wrote:
after compiling and viewing the program.

Quote context even when replying to your own posts.
I see you use GMail's interface. This is not a regular
Google group. This is NNTP.
Instead of clicking on the Reply link at the end of the post
click on the show options link and use the reply link provided
in there. It will automatically add the post you're replying to.
Also, don't top-post, i.e. don't type your reply above
the text you're replying to.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jan 30 '06 #8

Nelu wrote:
nringty wrote:
this is what i want ..u open one source and from that source.... u can
open other sources.

Please quote context when replying. Other people are seeing this
and you have to let them know what you are talking about.

Are you sure you're talking about different sources or already
compiled applications?

Tell me if this is right:

You have a file called p1.c and you compile it to p1.exe.
You have another file called p2.c and you compile it to
p2.exe.
Now you execute p1.exe and you want it to execute p2.exe?
If yes, the you can use the "system" function that you can find in
stdlib.h.
How you use the function depends on the implementation.

Different OSes give you the exec family of functions for more control.
There's also the option of creating dynamically linked libraries.
However, these are way off-topic here as they depend heavily on
your system.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)


ya the way u mentioned obove is the way i want it.

Jan 30 '06 #9
nringty wrote:
Nelu wrote:
nringty wrote:
this is what i want ..u open one source and from that source.... u can
open other sources.

Please quote context when replying. Other people are seeing this
and you have to let them know what you are talking about.

Are you sure you're talking about different sources or already
compiled applications?

Tell me if this is right:

You have a file called p1.c and you compile it to p1.exe.
You have another file called p2.c and you compile it to
p2.exe.
Now you execute p1.exe and you want it to execute p2.exe?
If yes, the you can use the "system" function that you can find in
stdlib.h.
How you use the function depends on the implementation.

Different OSes give you the exec family of functions for more control.
There's also the option of creating dynamically linked libraries.
However, these are way off-topic here as they depend heavily on
your system.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)


ya the way u mentioned obove is the way i want it.

You can snip my signature when posting a reply (follow-up)
as it's not important to our discussion. Thank you for
quoting context and not top-posting.

If that's what you want, then you can either use the family of
exec functions which depend on the system you are using or
you can use the system function in stdlib.h but its behavior is
implementation dependent. You should read the documentation
for your implementation to learn how you can use it successfully.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jan 30 '06 #10
> You can snip my signature when posting a reply (follow-up)
as it's not important to our discussion. Thank you for
quoting context and not top-posting.

If that's what you want, then you can either use the family of
exec functions which depend on the system you are using or
you can use the system function in stdlib.h but its behavior is
implementation dependent. You should read the documentation
for your implementation to learn how you can use it successfully.


thanks... i'll try it now.

Jan 30 '06 #11
nringty wrote:
You can snip my signature when posting a reply (follow-up)
as it's not important to our discussion. Thank you for
quoting context and not top-posting.

If that's what you want, then you can either use the family of
exec functions which depend on the system you are using or
you can use the system function in stdlib.h but its behavior is
implementation dependent. You should read the documentation
for your implementation to learn how you can use it successfully.


thanks... i'll try it now.

You're welcome.
Another observation: don't snip the name of the original poster.
You can snip the signature and anything that's irrelevant to the
discussion. Leave the name there (like: Nelu wrote: or nringty wrote:)
so people can follow the discussion and know who wrote what.
--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jan 30 '06 #12

Nelu wrote:
nringty wrote:
You can snip my signature when posting a reply (follow-up)
as it's not important to our discussion. Thank you for
quoting context and not top-posting.

If that's what you want, then you can either use the family of
exec functions which depend on the system you are using or
you can use the system function in stdlib.h but its behavior is
implementation dependent. You should read the documentation
for your implementation to learn how you can use it successfully.


thanks... i'll try it now.

You're welcome.
Another observation: don't snip the name of the original poster.
You can snip the signature and anything that's irrelevant to the
discussion. Leave the name there (like: Nelu wrote: or nringty wrote:)
so people can follow the discussion and know who wrote what.

ok i'll do that...

Jan 30 '06 #13
nringty wrote:
Nelu wrote:
nringty wrote: <snip>
thanks... i'll try it now.

You're welcome.
Another observation: don't snip the name of the original poster.
You can snip the signature and anything that's irrelevant to the
discussion. Leave the name there (like: Nelu wrote: or nringty wrote:)
so people can follow the discussion and know who wrote what.

ok i'll do that...

Thank you!

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jan 30 '06 #14
nringty wrote:
Nelu wrote:
nringty wrote:

.... snip ...
thanks... i'll try it now.


You're welcome.
Another observation: don't snip the name of the original poster.
You can snip the signature and anything that's irrelevant to the
discussion. Leave the name there (like: Nelu wrote: or nringty
wrote:) so people can follow the discussion and know who wrote what.

ok i'll do that...


Good man. You appear to learn quickly. I wish all the googlers
were like you. The following references may be of help.

http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.greenend.org.uk/rjk/2000/06/14/quoting.html
http://www.i-hate-computers.demon.co.uk/
http://web.ukonline.co.uk/g.mccaugha...ks/uquote.html

--
"The power of the Executive to cast a man into prison without
formulating any charge known to the law, and particularly to
deny him the judgement of his peers, is in the highest degree
odious and is the foundation of all totalitarian government
whether Nazi or Communist." -- W. Churchill, Nov 21, 1943
Jan 30 '06 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: LinuxN00b | last post by:
Hey, I have a problem linking Xerces-c (Apache's XMLParser) with my program. Here is a copy of my makefile. # CXX is for GNU make, CCC is for Solaris make # Define the default compiler to...
13
by: NM | last post by:
Sometimes ago I was having a problem in linking between C++ and Fortran program. That was solved (using input from this newsgroup) using the Fortran keyword "sequence" with the derived types (to...
3
by: Ken | last post by:
I have a win 2000 database of autographs and scanned photos. They are in the SAME directory. In the table, my "ImagePath" text field shows JUST the image name (i.e. "blank.jpg"). I have an image...
1
by: Venky | last post by:
I'm compiling a C program that is using Interbase 6.0 APIS. Getting the following errors at the time of linking. Linking test.exe: Linker Warning: No module definition file specified: using...
2
by: Ciko | last post by:
Still not clear to me: why whe use <stdio.h> I haven't link stdio library (in linking stage) while if I use something of <math.h> I must link this library? Thanks in advance.
7
by: Hal Vaughan | last post by:
I have a problem with port forwarding and I have been working on it for over 2 weeks with no luck. I have found C programs that almost work and Java programs that almost work, but nothing that...
1
by: Neha | last post by:
I want to link two C++ Programs such that a class defined in first program may be used in second program. Please can anyone help me as soon as possible.
0
by: capes | last post by:
have functions in my cell model calling CVODE for each time step. When I build the application I get a number of link errors: \cardiacsimulator.o Release\ccardiaccell.o Release\ccelldata.o...
7
by: Salad | last post by:
I am converting an application from A97 to A2003. I have 2 tables created by another application as a Foxpro.dbf. The table has no index. The connect string in A97 is FoxPro...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.