Compiling error in UNIX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Compiling error in UNIX
# 1  
Old 06-22-2015
Compiling error in UNIX

Hi, I'm trying to compile the code for a program and I run into the following error,

Code:
ncfile.h: In constructor ‘ncfile::NcAttribute<T>::NcAttribute(const std::string&, const char*)':
ncfile.h:357: error: there are no arguments to ‘strlen' that depend on a template parameter, so a declaration of ‘strlen' must be available
ncfile.h:357: note: (if you use ‘-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
PlistDlgImpl.cpp: At global scope:
PlistDlgImpl.cpp:3: warning: ‘rcsid' defined but not used
make: *** [PlistDlgImpl.o] Error 1

when trying to compile the following piece of code:

Code:
template <class T>
NcAttribute<T>::NcAttribute( const string& name, const char* text ):
    NcAttBase( name )
{ 
    for ( size_t i=0; i<strlen(text)+1; i++ )
        _value.push_back( text[i] );
}

From what I've read, the headers might have something to do with this. The headers included in this file are as follows:

Code:
#include <netcdf.h>
#include <string>
#include <vector>

#include <algorithm>
#include <numeric>

#include <cstdio>
#include <cstdlib>
#include <limits.h>
#include <iostream>

#include "realtype.h"
#include "ioerr.h"

Thanks for any help!!
# 2  
Old 06-22-2015
Code:
#include <cstring>

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Compiling UNIX System V

I tried to install UNIX system v R4, but the sources i've found(archive.org and WinWorldPC) are incomplete (missing cc, for example). Since archive.org has the source files i thought i could compile it and upload it for other users, but i cant get it to work. Any advice? (10 Replies)
Discussion started by: Parodper
10 Replies

2. UNIX for Beginners Questions & Answers

Error while compiling

Hi I am trying to compile a binary file (CASPER: Context-Aware Scheme for Paired-End Read) but I am getting the following error: user@user-OptiPlex-780 make g++ -O2 -Wall -fopenmp -c -o merge.o merge.c merge.c:8:35: fatal error: boost/unordered_map.hpp: No such... (2 Replies)
Discussion started by: Xterra
2 Replies

3. Shell Programming and Scripting

Compiling tools for unix machine using C

Hello everyone i have a script written in C and i need to compile it in a unix machine i am a first time programmer and i do not know how to compile this and also i need to save the results in a table please help we normally use instructions like build_bb -f but now im confused i dnt knw hw to use... (1 Reply)
Discussion started by: DeVGuL
1 Replies

4. Programming

Compiling Pro*C program under unix

Hello, I am trying to compile a Pro*C program under unix: proc iname=test.pc works fine but then I am not able to compile the test.c file : gcc test.c -o test.o -L $ORACLE_HOME/lib -l clntsh /usr/bin/ld: Object file format error in: /u01/app/oracle/product/10.1.0.2.0/lib:... (1 Reply)
Discussion started by: nsmrmd
1 Replies

5. UNIX for Dummies Questions & Answers

Compiling UNIX software packages Question

I am trying to learn how compile programs using this lesson. UNIX Tutorial Seven I am stuck at 7.4 Configuring and creating the Makefile. It stats that I need to configure the utility with my home directory. After doing the echo $HOME command I get /home/Bill_Gates. It then says to insert... (6 Replies)
Discussion started by: jae99
6 Replies

6. Programming

Problem compiling c file on unix

HI, I have a proc installation. On running the following 3 commands, I successfully get 3 C files. proc char_map=string util.pc proc char_map=string FDRFeedMain.pc proc char_map=string NonMons.pc This gives me util.c FDRFeedMain.c NonMons.c Now when i try to compile the... (6 Replies)
Discussion started by: allah_waris45
6 Replies

7. Programming

compiling c program in unix

if somebody can help me pls. i need the source code for a shell which compiles C or java programs in unix i need a very short and simple one, just the compiling part Respect (2 Replies)
Discussion started by: zlatan005
2 Replies

8. Shell Programming and Scripting

Compiling scripts written in Unix

I would like to convert some Unix scripts into machine language. I dont know how to programe in C. Is there any software out there that I can use to convert these Unix scripts into machine language. Thanks. (1 Reply)
Discussion started by: coburn
1 Replies

9. UNIX for Advanced & Expert Users

compiling idl file on unix

hi i need to compile idl files to convert them to classes, on Unix platform. Please tell me how to compile these files & which commands are to be used for this purpose. Thanks & Regards (6 Replies)
Discussion started by: rochitsharma
6 Replies

10. Solaris

compiling Oracle Forms in UNIX-solaris

I am using the command: f60gen to complie a form and it says it does not work Pls help, as I am trying to compile a few .fmb files to fmx... Cheers (1 Reply)
Discussion started by: etravels
1 Replies
Login or Register to Ask a Question