Dear All, 

This is my first post, I have just download a vm version of opensolaris (Crappy 
CD -ROM so difficult to load the live CD) and here are some problems I need 
some help.

First of all, please allow me to explain:

I am a Linux user and currently having a course require me to build C language 
codes, the code sample I got was something like this 

[code]
printf("remote IP: %d.%d.%.d.%d\n", remote_addr.sin_addr.S_un_b.s_b1, 
remote_addr.sin_addr.S_un_b.s_b2, remote_addr.sin_addr.S_un_b.s_b3, 
remote_addr.sin_addr.S_un_b.s_b4);
                printf("remote port: %d\n", remote_addr.sin_port);
[/code]

I hit compilation errors telling me that the S_un_b is not an variable in 
sin_addr, after some search it 
seems that the host we are about to play with in this cource is running on 
SunOS, which is having a little different with gcc (or different C language 
include files)and we are suppose to use CC to compile.

So I have install a vmware with OpenSolaris 2008.05, and then I installed 
NetBean with C/C++ support. The thing which surprise me was that I found out 
that the Netbean is using GCC to compile C files, and I hit the same 
compilation errors like using Linux (S_un_b is not in struc sin_addr.

May I know is there any way I could compile my codes under SunOS environment 
instead of a gcc Unix environment? 


Thanks in advance

So, I ins
-- 
This message posted from opensolaris.org

Reply via email to