Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I compile the UNIX C code with BCB?

Status
Not open for further replies.

ljh

Programmer
May 9, 2001
11
0
0
US

Anybody have the exprience to compile and link the UNIX C code with BCB? The C code works very well with 'gcc' in Unix, but cannot work with bcc32.exe. Is it possilbe to config the BCB so that it can be used as gcc? Thanks.
 
you dont do it. theres some things you can combine and some things you cant, and you hit 2 of them Cyprus
 
if your code is ansi compatible and u don't have any "API" that are specific to Unix then you can compile using BC++. I have done it and it works fine: Ofcourse it was a small program. I don't think that any settings are necessary. I used the free compiler from borland to do this. I didn't build a project though.

Welcome to the Pythian Games!
Long live Godess Athena!
dArktEmplAr of Delphi Oracle
 

Thanks. Now my Unix C code can be run in BCB.

It's strange that the soucre code is altered while I FTPed it from Unix to Windows. I believe that I FTPed it as a binary file. Originally, the source code was edited by xemacs in Unix. When I checked the source code with Word in Windows, I found that the file contains some strange symbols which confused the BCB.

In windows, I cannot find a text editor that is as good as xemacs. Where can I find a good program that can edit pure text file? notepad is too stupid.
 
[tab]On Unix, all text files end in a line feed. In DOS/Windows, text files end in a carriage return and a line feed. When you transfer text files from Unix to DOS/Windows and are using FTP, you must use FTP's ascii option. This will automatically change the LF to CR/LF when going from Unix to DOS/Windows and change the CR/LF to LF when going back. If you use the binary mode, no change will take place.

[tab]This is also why you want to use the binary mode when transferring programs. If you try to use ascii with programs, the LF character become CR/LF or vica versa and the program doesn't work. Some FTP programs look at the first few characters of the file to determine is the file needs binary or ascii mode but this is not infalliable.

[tab]Seems like everbody has their favorite editor so I don't want to start a "religious" editor war but I really like the Multi-Edit editor. It integrates directly into BCB and Delphi and can look at files in Unix, hex, or DOS mode. You can use it with Pascal, BASIC, VB, C/C++, Java, text, binary, etc. files. I like the ablility to edit hex files as well as ascii files. I've used it since the last DOS version. I've never used EDIT, Notepad, Wordpad, etc. after using Multi-Edit. I call it from BCB whenever I edit programs I write. Can't live without it. Oh, and you can call the compiler directly from Multi-Edit. See for more information.

James P. Cottingham
 
Hye... you need good editor! Then I would choose UltraEdit32, the best ever (my opinion). It has many functions, which I've not explorerd! It gives some words a different color when the files has a specific extension! Very Good for programing java, html, c++!! It also has an inbuilt hex editor! =) check out their site
Ultra-Edit sounds much like 2ffat's Multi-Edit! Much the same functions....

I think everybody should use this one(again my opinion alone).... Way much better then anyother i've ever tried! But as 2ffat said, everybody got their own special editor! Martin G Broman
mgb_svea@thevortex.com

DWS - Alpha Whitin Dead Wolf Society
Xaner Software, DB programer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top