Page 1 of 1

USING C IN TEXTPAD

Posted: Wed Mar 05, 2003 2:22 pm
by mundu
I just need to know what step should I follow in order to make my TextPad compile and link a project involving multiple files.

I have managed to compile and link a program which involved only one '.c' file and worked great. However I do not known what steps should I take when involving several '.c' files.

I am using lcc-win32 compiler with TextPad on a Windows98 and in the TextPad I added the tools need to compile, link and execute which worked fine as I said.

Re: USING C IN TEXTPAD

Posted: Wed Mar 05, 2003 3:44 pm
by Guest
mundu wrote:I just need to know what step should I follow in order to make my TextPad compile and link a project involving multiple files.

I have managed to compile and link a program which involved only one '.c' file and worked great. However I do not known what steps should I take when involving several '.c' files.

I am using lcc-win32 compiler with TextPad on a Windows98 and in the TextPad I added the tools need to compile, link and execute which worked fine as I said.
What are you doing to (hint :!:) make a project that's composed of several files?
As it sound you're working with a command line compiler (and not an IDE) I guess there's something like make on your machine...

Hope that helped.

Stephan

USING C IN TEXPAD (2)

Posted: Wed Mar 05, 2003 7:01 pm
by mundu
I used the steps listed in this site
"http://ems.calumet.purdue.edu/mcss/kraf ... stall.html" which helped me setting TextPad to be able to compile and link my simple file.

I am not using the comand line to link the project involving several files. I am using (or trying to) TextPad to do so.
Compiling and linking (within TextPad) worked when tryin out a simple printf"Hello world" program.

So my question is how to build a project made up of multiple files (ie C files) within TextPAD.

Thanks

Using C in TextPad

Posted: Fri Mar 07, 2003 8:56 am
by Jens Hollmann
Well.

TextPad is not an IDE.

You can compile and link a simple C-file because you can set up a user tool for your compiler (which calls the linker too). And calling a user defined tool from within TextPad is exactly the same as calling the tool from a command line (DOS-box). TextPad just sets the working directory and can automatically expand macros like the current file name etc. in the command line.

As there is no macro in TextPad that expands, say, to all open files, compiling a project of several C-files requires some additional work.

Normally there should be a make-tool (nmake, make) shipped with your compiler.

Or maybe you can invoke the compiler with *.c instead of $file. That would mean, you have to put all C-files in the same directory.

You have to read whatever documentation you have about your compilers command line parameters and/or about the make utility that comes with it. Sorry.

HTH

Jens