compile errors with gcc4.1.2 in rhel5.5


 
Thread Tools Search this Thread
Top Forums Programming compile errors with gcc4.1.2 in rhel5.5
# 1  
Old 01-06-2012
compile errors with gcc4.1.2 in rhel5.5

Hi All,

My test code ldap_test.c can be compiled successfully with gcc2.95.2. But not gcc 4.1.2 in redhat5.5. The command I used and the output are:
Code:
#gcc -fPIC -shared -o lib_ldap_rhel.so ldap_test.c 
/usr/include/ldap.h:179: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtypedefâ
/usr/include/ldap.h: In function âLDAP_Fâ:
/usr/include/ldap.h:721: error: expected declaration specifiers before âldap_get_optionâ

Can u guys let me know how to fix it?
Thanks,
Ray

Last edited by fpmurphy; 01-07-2012 at 10:20 AM.. Reason: code tags please!
# 2  
Old 01-07-2012
Did you install the GCC 4.1.2 packages from the redhat repo? Please also enable warnings with -Wall.
# 3  
Old 01-09-2012
Quote:
Originally Posted by frank_rizzo
Did you install the GCC 4.1.2 packages from the redhat repo? Please also enable warnings with -Wall.
-Wall is already enabled.

# gcc -fPIC -shared -Wall -o ldap_rhel.so ldap_test.c
ldap_test.c:58: error: expected identifier or â(â before string constant

Here is error line 58:
...
55 #ifdef _WIN32
56 #include <afx.h>
57 #else
58 extern "C"
59 {
60 #endif
...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Compiling gcc to compile make to compile yaboot

I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies

2. Solaris

Compile errors on Solaris 10 (missing libwrap)

I'm trying to compile tacacs+-F4.0.4.18 on Solaris 10 (sparc based server). It fails during the "./configure" phase with the following error: checking whether to use libwrap... yes configure: error: Could not find libwrap. You must first install tcp_wrappers. I do a have tcpwrappers... (4 Replies)
Discussion started by: pingmeback
4 Replies

3. Solaris

Errors trying to compile PHP for use with MySQL on Solaris 10

have installed and am using the GNU based tools from the Sunfreeware site to compile PHP. I already have Apache, MySQL, and Oracle compiled and working properly. Below is my configure string for my PHP build: ./configure --prefix=/usr/local/php5 \... (2 Replies)
Discussion started by: sunsysadm2003
2 Replies

4. Programming

Not able to compile Pro*c file due - give errors and points to /usr/include/.. file

I am trying to compile the pro*C file but gives errors. It says it encountered "std" while it was expecting ; , = ( $ $ORACLE_HOME/bin/proc tradewind/dataaccess/Blob.pcc Pro*C/C++: Release 10.2.0.3.0 - Production on Fri May 9 11:10:54 2008 Copyright (c) 1982, 2005, Oracle. All rights... (0 Replies)
Discussion started by: shafi2all
0 Replies

5. AIX

Compile errors because of the ras.h file

I recently compile some code in 32 bit mode on a AIX 5.3 server that has its kernal set to 64 bit mode. The compile was successful and the code works great. That being the case I use the model of the successful makefile on some other code but ended up getting errors that looked like this...... ... (2 Replies)
Discussion started by: morrisey
2 Replies

6. UNIX for Dummies Questions & Answers

Major OS errors/Bash errors help!!!!

Hi all, dummy here.... I have major errors on entering the shell. On login I get: -bash: dircolors: command not found -bash: tr: command not found -bash: fgrep: command not found -bash: grep: command not found -bash: grep: command not found -bash: id: command not found -bash: [: =: unary... (12 Replies)
Discussion started by: wcmmlynn
12 Replies

7. UNIX for Dummies Questions & Answers

Compile and dump errors to a text file

Hi there, I want to compile a program and dump errors to a text file. How could I do so..? Thanks for reading and thanks in advance!!! (6 Replies)
Discussion started by: starstarting
6 Replies

8. AIX

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (2 Replies)
Discussion started by: mcastill66
2 Replies

9. UNIX for Advanced & Expert Users

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (0 Replies)
Discussion started by: mcastill66
0 Replies

10. Programming

compile xev on HPUX 10.20 - errors

Hello, i compiled the program xev under HPUX 10.20 and there are a lot of errors like this. Can anybody help me to fix this errors? make xev cc -O xev.c -o xev /usr/ccs/bin/ld: Unsatisfied symbols: XFree (code) XKeysymToString (code) XSelectInput (code) XOpenDisplay... (1 Reply)
Discussion started by: lan
1 Replies
Login or Register to Ask a Question