Sponsored Content
Top Forums Programming How to compile and run C++ programs in UNIX environment? Post 22066 by Kahuashi on Tuesday 28th of May 2002 12:46:37 AM
Old 05-28-2002
Data It seems that there's no C++ compiler in my UNIX system

Smilie I am using the school's UNIX system and none of those commands, like "gcc", "CC", "g++", work. Cry...
But I have Borland C++5.5. Do I have to set path like in Java? I could not make it work either. Guess I am just being dum. wuwu...
 

10 More Discussions You Might Find Interesting

1. Programming

How to Compile programs using cc??

How do you Compile programs using cc?? I'm lost. Do I need to buy C or what? I'm only going to use it very few times a year. From what everyone seems to be telling me, it sounds like it is build into the Unix system but I'm having no luck. Please help or just point me in the right direction. ... (7 Replies)
Discussion started by: spotanddot
7 Replies

2. Programming

I have not c compile environment ,i can download it but it ends with *.gz,so i can't

I need for help . (1 Reply)
Discussion started by: dsun5
1 Replies

3. Programming

How to compile pro*c, C programs

Hi, How to precompile the c program which has proc statements within it. If it is only c, I will use the following cmd cc filename.c -o output so please tell me what command I have to use for precompilation. I beleave that this is not an oracle or proc forum, but still I hope will... (1 Reply)
Discussion started by: sweta
1 Replies

4. UNIX for Dummies Questions & Answers

compile .exe, run in unix.

Hi all, I am using putty to access my school unix servers. I have recently downloaded a source file of a software in .tar format. I change the code of the program and compile it in VS8 and build an .exe file. 1) I copy the .exe file to my school account but I could not make it work. How... (2 Replies)
Discussion started by: hkullana
2 Replies

5. Solaris

how to compile and run java programs

Hi, I have installed Solaris 10 on a VMware. How to compile a java program as there is no javac in 'bin' directory. Thanks in advance for answers and sorry if the question is soo basic. (3 Replies)
Discussion started by: mayahari
3 Replies

6. UNIX for Advanced & Expert Users

cannot run c compiled programs

iam in the way of making graphics using SDL.i copied from cd usign mount -a /cdrom cd /cdrom cp SDL-1.2.11.tar.gz /usr/test cd /usr/test gunzip SDL-1.2.11.tar.gz tar -xf SDL-1.2.11.tar cd SDL-1.2.11 ./configure ... ... it stops at checking whether the c compiler... (4 Replies)
Discussion started by: kumarangopi
4 Replies

7. Programming

Makefile includes and shell environment during compile

Below is the top of my Makefile. On one machine, I have mysql_config5, and another, I have mysql_config. In my .bashrc file of one UNIX machine, I added an alias so that that mysql_config5 is mysql_config, however, when I do make, it doesn't use that environment and I get compile errors, unless I... (1 Reply)
Discussion started by: pyramation
1 Replies

8. UNIX for Dummies Questions & Answers

How to access/run c programs on Putty?

Hi all, I wrote a couple noobie programs and had them compiled over Putty (using gcc), but I don't know what command I should use to run them. Please assume that I'm a complete noob when it comes to programming and putty commands. Thank you for your help! (1 Reply)
Discussion started by: Recycalable
1 Replies

9. UNIX for Dummies Questions & Answers

how to run two unix/linux programs on two different cpu cores

Hi folks, I want to know how to run two unix programs on two different cpu cores on a 2-core or 4-core or 8-core CPU machine? Extending this how would i run four and eight unix programs on 4-core and 8-core machine respectively? If this can be done, how to know which program is assigned to... (1 Reply)
Discussion started by: kaaliakahn
1 Replies

10. UNIX for Dummies Questions & Answers

How to compile and run java in UNIX?

Hi Im using MobaXterm Unix on my windows XP.I want to compile java in unix.I have installed java to the following path C:\Program Files\Java\jdk1.7.0_09\bin In order to compile the java prog im typing the following command after entering into the bin directory: C:\Program... (2 Replies)
Discussion started by: ak3141
2 Replies
Encode::Guess(3pm)					 Perl Programmers Reference Guide					Encode::Guess(3pm)

NAME
Encode::Guess -- Guesses encoding from data SYNOPSIS
# if you are sure $data won't contain anything bogus use Encode; use Encode::Guess qw/euc-jp shiftjis 7bit-jis/; my $utf8 = decode("Guess", $data); my $data = encode("Guess", $utf8); # this doesn't work! # more elaborate way use Encode::Guess; my $enc = guess_encoding($data, qw/euc-jp shiftjis 7bit-jis/); ref($enc) or die "Can't guess: $enc"; # trap error this way $utf8 = $enc->decode($data); # or $utf8 = decode($enc->name, $data) ABSTRACT
Encode::Guess enables you to guess in what encoding a given data is encoded, or at least tries to. DESCRIPTION
By default, it checks only ascii, utf8 and UTF-16/32 with BOM. use Encode::Guess; # ascii/utf8/BOMed UTF To use it more practically, you have to give the names of encodings to check (suspects as follows). The name of suspects can either be canonical names or aliases. CAVEAT: Unlike UTF-(16|32), BOM in utf8 is NOT AUTOMATICALLY STRIPPED. # tries all major Japanese Encodings as well use Encode::Guess qw/euc-jp shiftjis 7bit-jis/; If the $Encode::Guess::NoUTFAutoGuess variable is set to a true value, no heuristics will be applied to UTF8/16/32, and the result will be limited to the suspects and "ascii". Encode::Guess->set_suspects You can also change the internal suspects list via "set_suspects" method. use Encode::Guess; Encode::Guess->set_suspects(qw/euc-jp shiftjis 7bit-jis/); Encode::Guess->add_suspects Or you can use "add_suspects" method. The difference is that "set_suspects" flushes the current suspects list while "add_suspects" adds. use Encode::Guess; Encode::Guess->add_suspects(qw/euc-jp shiftjis 7bit-jis/); # now the suspects are euc-jp,shiftjis,7bit-jis, AND # euc-kr,euc-cn, and big5-eten Encode::Guess->add_suspects(qw/euc-kr euc-cn big5-eten/); Encode::decode("Guess" ...) When you are content with suspects list, you can now my $utf8 = Encode::decode("Guess", $data); Encode::Guess->guess($data) But it will croak if: o Two or more suspects remain o No suspects left So you should instead try this; my $decoder = Encode::Guess->guess($data); On success, $decoder is an object that is documented in Encode::Encoding. So you can now do this; my $utf8 = $decoder->decode($data); On failure, $decoder now contains an error message so the whole thing would be as follows; my $decoder = Encode::Guess->guess($data); die $decoder unless ref($decoder); my $utf8 = $decoder->decode($data); guess_encoding($data, [, list of suspects]) You can also try "guess_encoding" function which is exported by default. It takes $data to check and it also takes the list of suspects by option. The optional suspect list is not reflected to the internal suspects list. my $decoder = guess_encoding($data, qw/euc-jp euc-kr euc-cn/); die $decoder unless ref($decoder); my $utf8 = $decoder->decode($data); # check only ascii and utf8 my $decoder = guess_encoding($data); CAVEATS
o Because of the algorithm used, ISO-8859 series and other single-byte encodings do not work well unless either one of ISO-8859 is the only one suspect (besides ascii and utf8). use Encode::Guess; # perhaps ok my $decoder = guess_encoding($data, 'latin1'); # definitely NOT ok my $decoder = guess_encoding($data, qw/latin1 greek/); The reason is that Encode::Guess guesses encoding by trial and error. It first splits $data into lines and tries to decode the line for each suspect. It keeps it going until all but one encoding is eliminated out of suspects list. ISO-8859 series is just too successful for most cases (because it fills almost all code points in x00-xff). o Do not mix national standard encodings and the corresponding vendor encodings. # a very bad idea my $decoder = guess_encoding($data, qw/shiftjis MacJapanese cp932/); The reason is that vendor encoding is usually a superset of national standard so it becomes too ambiguous for most cases. o On the other hand, mixing various national standard encodings automagically works unless $data is too short to allow for guessing. # This is ok if $data is long enough my $decoder = guess_encoding($data, qw/euc-cn euc-jp shiftjis 7bit-jis euc-kr big5-eten/); o DO NOT PUT TOO MANY SUSPECTS! Don't you try something like this! my $decoder = guess_encoding($data, Encode->encodings(":all")); It is, after all, just a guess. You should alway be explicit when it comes to encodings. But there are some, especially Japanese, environment that guess-coding is a must. Use this module with care. TO DO
Encode::Guess does not work on EBCDIC platforms. SEE ALSO
Encode, Encode::Encoding perl v5.12.1 2010-04-26 Encode::Guess(3pm)
All times are GMT -4. The time now is 08:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy