Compiler questions ??


 
Thread Tools Search this Thread
Operating Systems Solaris Compiler questions ??
# 1  
Old 03-03-2010
Compiler questions ??

Hi Gurus,

I am back again with a similar kind of question.

I have a Sun Firex4100 server. I found that it has a 64bit X86 processor using below commands:

Code:
 
[!]root: isainfo -kv
64-bit amd64 kernel modules

I had installed Sun Studio 12 in this server long back for my development team.
When i compile am able to get only 32 bit executables.
[!]root: cat hello.c
#include <stdio.h>
void main()
{
printf("Hello World");
}
[!]root: cc hello.c -o /tmp/hello.o
@ /users/e1011605
[!]root: file /tmp/hello.o
/tmp/hello.o: ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, not stripped

How do i compile 64bit modules using the compiler?

Install Directory - /opt/sunstudio12.1/bin
OS - Sol-5.10
Processor - X86
Hardware - Sunfire x4100.

Thanks
HG

---------- Post updated at 09:22 AM ---------- Previous update was at 09:20 AM ----------

Sorry Guru's,

I found the answer.

Code:
[!]root: cc hello.c -m64 -o /tmp/hello.o
 @ /users/e1011605
[!]root: file /tmp/hello.o
/tmp/hello.o:   ELF 64-bit LSB executable AMD64 Version 1 [SSE FXSR FPU], dynamically linked, not stripped

Sorry to disturb.

HG


# 2  
Old 03-04-2010
Smilie Good job!

I always love it when I'm able to find answers on my own. But sometimes, that's just not enough.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

2. UNIX for Dummies Questions & Answers

cc compiler and gcc compiler

hi, can we install gcc compiler in unix based OS(sun solar,IBM AIX,HP,etc) and also can we install sun cc compiler in AIX environment and vice versa. and more ..is linux support cc compiler regards Ajay (3 Replies)
Discussion started by: ajaysahoo
3 Replies

3. Solaris

C Compiler

Greetings, :rolleyes: :o :confused: I am working on Solaris 8. I have a few questions: 1. How do I determine if I have the CC compiler? I know it isn't in my $PATH, so how do I find it? 2. How do you install wget? I have read the INSTALL file, but I am not familar with the switches,... (25 Replies)
Discussion started by: Roam
25 Replies

4. Programming

How Can a Machine Reads a Compiler Since A Compiler is Written in Text! Not Binaries?

To make a programming language you need a compiler, so what was the first programming language and how was is created if you need the compiler first? The compiler itself is considered as a high language comparing to the machine! since the compiler is not created in 1's and 0's... Eventhough i... (12 Replies)
Discussion started by: f.ben.isaac
12 Replies

5. UNIX for Dummies Questions & Answers

xl C/C++ compiler to GCC compiler

Hi, we are converting from IBM-AIX(xl c/c++ compiler) to Linux(GCC complier). As a part of this i need to change the CFLAGS. The xl c/c++ complier CFLAGS is CFLAGS := $(CDEBUG) $(PROJECT_INCLUDE_DIRS) $(COBJECT_MODE) -qcpluscmt -qmakedep -qcheck=all \ -qalign=bit_packed $(LINT_FLAGS)... (0 Replies)
Discussion started by: pbattu1
0 Replies

6. Programming

C compiler

my C compiler cc is not working. probably it has corrupted. can anyone tell me location from where i can download it. Regards (4 Replies)
Discussion started by: rochitsharma
4 Replies

7. Programming

c compiler

i'm using linux to compile my c program right now. are there any free c compiler with all the standard header file, such as <stdio.h>, <unistd.h>..., i can download and use? can Microsoft Visual C++ compile C code? thanks. (1 Reply)
Discussion started by: bb00y
1 Replies

8. Programming

c compiler

What can I do if my unix didn't come with cc or gcc. there must be a place to get those programs. Just not where i can find them:confused: (3 Replies)
Discussion started by: hector
3 Replies

9. Programming

Compiler....

:confused: How to do Compiler a .so with oracle9 libs? I have my file -> oracobo.pc my .so is called by Cobol App. -> Runcobol (I don't have source). Which is the statement of cc compiler? It's Right : proc oracobo.pc cc -O -q32 -DDYNAMIC_LIBRARIES_SUPPORTED... (0 Replies)
Discussion started by: luckycs
0 Replies
Login or Register to Ask a Question