Compilation on SunOs5.7 using gcc 3.3.5


 
Thread Tools Search this Thread
Operating Systems Solaris Compilation on SunOs5.7 using gcc 3.3.5
# 1  
Old 09-11-2006
Compilation on SunOs5.7 using gcc 3.3.5

I have the following declaration in file named vx_solaris.h
(Path : /usr/share/src/tpkgs/veritas/solaris_sparc/include/sys/fs/vx_solaris.h)

typedef (*vx_creatfptr_t)(struct vnode *, char *, struct vattr *, vcexcl_t, int, struct vnode **, vx_cred_t *, int);

I include vx_solaris.h in one of the files. I get the following error.

/usr/share/src/tpkgs/veritas/solaris_sparc/include/sys/fs/vx_solaris.h: At global scope:
/usr/share/src/tpkgs/veritas/solaris_sparc/include/sys/fs/vx_solaris.h:254: error: ISO
C++ forbids declaration of `vx_creatfptr_t' with no type

I am using gcc3.3.5. I can't edit the file vx_solaris.h

Can you please suggest me which flag can help me get rid of the “no type” error.
# 2  
Old 09-11-2006
This looks like a valid error to me. Even if you get it to compile with no warnings this code probably will generate a fatal error during run time.

Just because a compiler makes an exectuable doesn't mean that it will work flawlessly.
Don't just edit the header file ... [plus, why can you not edit files?]
# 3  
Old 09-11-2006
Thanks for the reply.

The file vx_solaris.h is in /usr/share/src/tpkgs/...... I am not suppose to change that.

In my code base, my file vxfs.cpp includes the file vx_solaris.h
(Path : /usr/share/src/tpkgs/veritas/solaris_sparc/include/sys/fs/vx_solaris.h)

The compilation of vxfs.cpp fails with following error.
/usr/share/src/tpkgs/veritas/solaris_sparc/include/sys/fs/vx_solaris.h: At global scope:
/usr/share/src/tpkgs/veritas/solaris_sparc/include/sys/fs/vx_solaris.h:254: error: ISO
C++ forbids declaration of `vx_creatfptr_t' with no type


It has to be some flag which i am missing on my side.
# 4  
Old 09-11-2006
It looks like you are trying to install the vxfs filesystem from Veritas. Right?
We have Veritas on some of our boxes, and we got help from them.

If it is a compiler flag - it must be one like -DOS_UNIX -DPLAT_SUN ( I made these up, we have Veritas on HPUX). The -D<whatever> forces a #define to be created for the precompiler. Is there any readme or help file you have?
# 5  
Old 09-12-2006
yes right....I am trying to install the vxfs filesystem

There is no help file as such.
I was just wondering if any gcc flag from

http://www.hmug.org/man/1/gcc.php

can resolve this issue.

Thanks again.
# 6  
Old 09-18-2006
-fpermissive resolves this issue....
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SunOS5.10 and SuSe Linux Enterprise

OK, I've been thrown into an issue at my company where the security folks want password aging turned on for their limited NIS environment. The config is a SunOS5.10 (Solaris 10) Master with several slaves and several SuSe Enterprise Server 11 Clients. What I'm looking to understand is... (0 Replies)
Discussion started by: rzrv15
0 Replies

2. AIX

Gcc compilation problem on AIX 6.1

Hi, I have to compile a program on my server, runs on AIX 6.1. On my test server the compilation is ok (AIX 6.1); but when I try it on production server, I have this gcc prog.c -o prog_out In file included from resmon.c:111: /usr/include/unistd.h:924: error: expected ')' before ' I noticed... (1 Reply)
Discussion started by: tnjulius
1 Replies

3. Shell Programming and Scripting

Compilation

Hi All, Do we have a way to compile a shell program? I am using ksh/bash/sh and not CSH. Cheers Ravi (12 Replies)
Discussion started by: panyam
12 Replies

4. Programming

Header file compilation using gcc in Sparc Solaris

I am facing problem while migrating the c++ code from Linux to Solaris. In linux the code is absolutly compiled fine with GCC compiler but when i am using the same in Solaris it coomplains bash-3.1$ gcc LibSip.h gcc: Compilation of header file requested The same command is working fine in... (2 Replies)
Discussion started by: mrupesh74
2 Replies

5. UNIX for Dummies Questions & Answers

Compilation

Hi All, We have a C program existing in one of the folders which I have to modify a lil bit, When I'm trying to compile the program using GCC or CC command its showing as ksh: gcc: not found is that mean there is no compiler or do I have to verify for something, please advice Thank... (2 Replies)
Discussion started by: diggermf
2 Replies

6. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

7. Programming

64-Bit gcc Compilation

Hi All I have a question on the compilation Assume i am working on 64 bit Linux OS. i am making shared objects and libraries required for our project. Can i compile 32 bit libraries using gcc of 64 -bit OS? Or Is there any restriction in the 32-bit or 64-bit compilers when trying to... (6 Replies)
Discussion started by: dhanamurthy
6 Replies

8. Programming

Compilation error : Please help

state_field state_abvr = { "AL","ALABAMA", "AK","ALASKA", "AZ","ARIZONA", "AR","ARKANSAS", "CA","CALIFORNIA", "CO","COLORADO", "CT","CONNECTICUT", "DE","DELAWARE", "DC","DISTRICT-OF-COLUMBIA", "FL","FLORIDA", "GA","GEORGIA", "HI","HAWAII", "ID","IDAHO", "IL","ILLINOIS",... (1 Reply)
Discussion started by: jagan_kalluri
1 Replies

9. Programming

compilation error in gcc

Hi, Should be too simple... I wrote a sample c++ program like #include <iostream.h> int main() {$ int ab=455; cout << ab << endl; return 1; } I am getting error like $ gcc u1.cpp Undefined first referenced ... (9 Replies)
Discussion started by: ls1429
9 Replies

10. Programming

gcc compilation

how can i do static compilation in gcc my gcc version is # gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/u sr/share/info --enable-shared --enable-threads=posix --disable-checking... (3 Replies)
Discussion started by: collins
3 Replies
Login or Register to Ask a Question