Sponsored Content
Top Forums Programming Incompatiblity of the code due to CC compiler version mismatch. Post 302769044 by Revathi R on Tuesday 12th of February 2013 01:02:20 AM
Old 02-12-2013
/opt/SUNWspro/bin/CC -o msggen msggen.o licensemessage.o ../../../../libs/lib/libgeneral.a

---------- Post updated 02-12-13 at 01:02 AM ---------- Previous update was 02-11-13 at 05:43 AM ----------

Hello,

I am working on migration of code from 4.2 to 5.8

I can complie a snippet with CC 5.8


Code:
#include<stdio.h>
#include<iostream.h>
int main()
{
int len=10;
char *coded = new char[len];
int *a=new int();
printf("Herllo");
cerr<<"Hello world:";
 cerr << "\nString Array Out of Bounds!! index: " << ":elem"
             << " String length (0-"
             <<" len" << ")\n";
int len1=strlen("idjfhdjfjtxt") + 1;
printf("%d\n",len1);
delete [] coded;
delete a;
}

Code:
CC sample.C
compiled well and good and i could see the out put when i run

Code:
CC --compat=4 sample.C
"Ccode.C", line 13: Error: The function "strlen" must have a prototype.
1 Error(s) detected.

How can i resolve this, as i am migrating my entire code during linking i am getting many symbol referencing errors as mentioned in previoues post


Thanks in advance,
Revathi R.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

gcc compiler version?

How do you determine which version of the GNU gcc compiler is on your system? (1 Reply)
Discussion started by: Ben070371
1 Replies

2. Solaris

X Keyboard Extension version mismatch

I want to use calls from the X Keyboard Extension, but get "library version mismatch" error. First one is XkbLibraryVersion(..). This one already returns false. Then I call XkbOpenDisplay(...) which does not return a valid display; return value is XkbOD_NonXkbServer. If I open the display with... (0 Replies)
Discussion started by: hiker04
0 Replies

3. UNIX for Dummies Questions & Answers

What version is the compiler?

Hi ! we have a intel fortran compiler on our computer. How do i find out what version it is ? Thank you, dsmv. (1 Reply)
Discussion started by: dsmv
1 Replies

4. AIX

how to find out the compiler version and OS from binary file

Command to get the Compiler version(xlc/gcc) from the binary on AIX platform. I m searching for the Command, to get the Compiler(xlc/gcc) used to build the binary on AIX. I got two commands used on Linux Platform: - readelf -a <lib> | grep comment - hexdump -C -s 0x49e7b -n 1812 <lib> ... (1 Reply)
Discussion started by: Prajakta
1 Replies

5. AIX

install two different compiler version

Hi all. I have a simple question. There's a way to install under AIX system (5.3) two different compiler version, i.e. ibm xlf fortran 11 and 12? Seems that smitty doesn't allows user to change the default installation path; it only allows you to save the replaced files of the superseded... (1 Reply)
Discussion started by: poldo000
1 Replies

6. Solaris

java version mismatch for normal user and root user

:confused: I installed latest version of java ( jre 1.6) on Solaris Machine ......when I run java -version as root, shows the latest version but when I run java -version as normal user, shows the old / previous version What should I do to fix this ...should show the latest version... (3 Replies)
Discussion started by: frintocf
3 Replies

7. Programming

Choose compiler version

Hi, I'm new, here, and I'm searching for a simple solution for a simple problem. I'm working on RedHat 4.4.6-4 through a CentOS Virtual Machine and due to some reasons I must compile my C++ codes with these two different g++ versions: 4.4.6 and 4.2.2. The fact is that I should be able to... (4 Replies)
Discussion started by: Marcuss
4 Replies

8. AIX

Checking xlc compiler version

Hi, Below is output of lslpp command. bash-3.00# lslpp -L | grep xlC xlC.aix50.rte 11.1.0.1 C F XL C/C++ Runtime for AIX 5.3 xlC.cpp 9.0.0.0 C F C for AIX Preprocessor xlC.msg.en_US.cpp 9.0.0.0 C F C for AIX... (2 Replies)
Discussion started by: manoj.solaris
2 Replies

9. Linux

Linking issue due to so version number

Hi all, currently I'm facing a issue in linking a .so file. In my build machine, I've libcrypto.so.6 and there is a softlink as libcrypto.so. In my make file I'm trying to link to the lib using -L -lcrypto and it is success and created my test.exe. When I copy this test.exe to other... (4 Replies)
Discussion started by: vijkrr
4 Replies

10. Shell Programming and Scripting

Need fix for rsync Error due to version mismatch

rsync --delay-updates -F --compress --archive --rsh='/usr/bin/ssh -t -a -x' /web/admin/Transfer/data/ user1@destserver1:/tmp/testf rsync version on sender server is:3.0.9 rsync version on sender server is:3.0.6 Linux sourceserver1 3.10.0-693.17.1.el7.x86_64 #1 SMP Sun Jan 14 10:36:03 EST... (1 Reply)
Discussion started by: mohtashims
1 Replies
ECVT_R(3)						     Linux Programmer's Manual							 ECVT_R(3)

NAME
ecvt_r, fcvt_r, qecvt_r, qfcvt_r - convert a floating-point number to a string SYNOPSIS
#include <stdlib.h> char *ecvt_r(double number, int ndigits, int *decpt, int *sign, char *buf, size_t len); char *fcvt_r(double number, int ndigits, int *decpt, int *sign, char *buf, size_t len); char *qecvt_r(long double number, int ndigits, int *decpt, int *sign, char *buf, size_t len); char *qfcvt_r(long double number, int ndigits, int *decpt, int *sign, char *buf, size_t len); DESCRIPTION
The functions ecvt_r, fcvt_r, qecvt_r and qfcvt_r are identical to ecvt, fcvt, qecvt and qfcvt, respectively, except that they do not return their result in a static buffer, but instead use the supplied buf of size len. See ecvt(3) and qecvt(3). NOTES
These functions are obsolete. Instead, sprintf() is recommended. CONFORMING TO
These functions are GNU extensions. SEE ALSO
ecvt(3), qecvt(3), sprintf(3) GNU
2002-08-25 ECVT_R(3)
All times are GMT -4. The time now is 08:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy