- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Compile not working
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2005 07:48 AM
тАО06-15-2005 07:48 AM
g++ -c -O3 -funroll-loops -ffast-math intxfile.cpp -o intxfile.o
intxfile.h: In destructor 'iNTXfile::~iNTXfile()':
intxfile.h:135: error: 'close' was not declared in this scope
intxfile.cpp: In constructor 'iNTXfile::iNTXfile(const char*)':
intxfile.cpp:80: error: 'read' was not declared in this scope
intxfile.cpp:95: error: 'close' was not declared in this scope
intxfile.cpp:100: error: 'lseek' was not declared in this scope
intxfile.cpp: In member function 'int iNTXfile::LoadRecord(long int)':
intxfile.cpp:132: error: 'lseek' was not declared in this scope
intxfile.cpp:137: error: 'read' was not declared in this scope
gmake: *** [intxfile.o] Error 1
Any ideas?
Solved! Go to Solution.
- Tags:
- g++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2005 11:44 AM
тАО06-15-2005 11:44 AM
SolutionFirst make sure files don't have DOS style line endings (^M). Either unzip with -a or use dos2ux afterwards to convert the files.
Make the following mods to the source files.
Add -Dunix to each gcc line in makedependencies.sh
Copy Makefile.sparc to Makefile.hpux
Add -fpermissive to CFLAGS in Makefile.hpux
Add -Dunix -DMAX_PATH=256 to CPPFLAGS In Makefile.hpux
# sh makedependencies.sh
# gmake -f Makefile.hpux
Hope that works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2005 02:53 PM
тАО06-15-2005 02:53 PM
Re: Compile not working
are you positive you have the proper compile options ? what about Binutils ? do you need a Library reference to the g++ -c lines in your make ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2005 09:10 AM
тАО06-16-2005 09:10 AM
Re: Compile not working
gcc -MM -Dunix *.cpp *.c > dependencies
gcc -MM -xc++ -Dunix *.rc | sed -e "s/\.rc\.o/.ro/" >> dependencies
gcc -MM -xc++ -Dunix *.idl | sed -e "s/\.idl\.o/.tlb/" >> dependencies
Here is the output after I ran it:
sh makedependencies.sh
dllmain.cpp:24:21: error: windows.h: No such file or directory
dllmain.cpp:25:20: error: wtypes.h: No such file or directory
dllmain.cpp:26:22: error: basetyps.h: No such file or directory
In file included from ntxshp.cpp:31:
statusdlg.h:27:21: error: windows.h: No such file or directory
statusdlg.cpp:24:21: error: windows.h: No such file or directory
statusdlg.cpp:25:22: error: commctrl.h: No such file or directory
avexec.c:25:21: error: windows.h: No such file or directory
avntxshp.rc:25:21: error: windows.h: No such file or directory
avntxshp.rc:26:20: error: winver.h: No such file or directory
ntxshape.rc:23:21: error: windows.h: No such file or directory
ntxshape.rc:24:20: error: winver.h: No such file or directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2005 11:57 AM
тАО06-16-2005 11:57 AM
Re: Compile not working
When you say that program is not working correctly; are there any errors reported?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2005 02:26 AM
тАО06-17-2005 02:26 AM
Re: Compile not working
ERROR: Could not open NTX file "nb0208.ntx"
The file is there and when I copied the file into my windows directory and used my windows version of ntxshape, it worked....but I need it to work on unix.
Thanks again for all your help!
Sally
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2005 12:12 PM
тАО06-17-2005 12:12 PM
Re: Compile not working
if (!ntx.IsValid()) {
if (access(ntxfname,(F_OK))==-1) {
(void)fprintf(stderr,"ERROR: NTX file \"%s\" does not exist.\n",ntxf
name);
} else {
(void)fprintf(stderr,"ERROR: Could not open NTX file \"%s\"\n",ntxfn
ame);
}
return 2;
}
So it looks like ntxshape found your ntx file to be invalid, which is strange since windows version of ntxshape found the file to be ok.
Are ntx files binary or ascii format? If it's binary make sure it's been transferred correctly from the windows system (e.g. use binary transfer mode in ftp). If file is ascii, make sure it has UNIX style line endings (e.g. no ^M).
Otherwise maybe it's worth trying another ntx file or you may want to post your question to ntxshape forum at
http://sourceforge.net/forum/?group_id=52747.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2005 10:29 AM
тАО06-21-2005 10:29 AM
Re: Compile not working
I posted to the NTX forum before I posted here and still have no responses. I also tried other .ntx files and nothing works. I really can't figure out whether it is the ntxshape binary or the .ntx files that are the problem. I tried ftp'ing the .ntx file in ascii and binary mode and neither worked.
I am very close to giving up, as I am not sure where to go from here.
Thanks for all the help!
Sally
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2005 12:54 PM
тАО06-21-2005 12:54 PM
Re: Compile not working
You can get gcc from http://www.hp.com/go/gcc. Get binutils and gcc for 11i v1. 32-bit gcc will be installed in /usr/local/bin/gcc. Make sure that one is first in your PATH. Also make sure you uninstall your previous gcc before installing the new one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2005 08:58 AM
тАО06-22-2005 08:58 AM
Re: Compile not working
Well I am trying to compile with the 32 bit and now get the following (I will delete and un-zip again to start fresh):
ar: warning: the file intxfile.o is from an incompatible architecture
ar: warning: the file ntx.o is from an incompatible architecture
ar: warning: the file ntxrecs.o is from an incompatible architecture
ar: warning: the file ntxshape.o is from an incompatible architecture
ar: warning: the file ntxdesc.o is from an incompatible architecture
ar: warning: the file ntxline.o is from an incompatible architecture
ar: warning: the file descattr.o is from an incompatible architecture
ar: warning: the file dbfout.o is from an incompatible architecture
ar: warning: the file dbfopen.o is from an incompatible architecture
ar: warning: the file shpopen.o is from an incompatible architecture
ar: warning: the file shpout.o is from an incompatible architecture
ar: warning: the file lineout.o is from an incompatible architecture
ar: warning: the file pntout.o is from an incompatible architecture
ar: warning: the file nameout.o is from an incompatible architecture
ar: warning: the file patmatch.o is from an incompatible architecture
ar: warning: the file ntxbuild.o is from an incompatible architecture
ar: warning: the file ntxsearch.o is from an incompatible architecture
ar: warning: the file polyout.o is from an incompatible architecture
gcc -Wall -fpermissive -O3 -funroll-loops -ffast-math -fpermissive -D_BIGENDIAN_MACHINE -Dunix -DMAX_PATH=256 -c -o stripext.o stripext.c
cc1: warning: command line option "-fpermissive" is valid for C++/ObjC++ but not for C
cc1: warning: command line option "-fpermissive" is valid for C++/ObjC++ but not for C
gcc -c -Wall -fpermissive -O3 -funroll-loops -ffast-math -fpermissive -D_BIGENDIAN_MACHINE -Dunix -DMAX_PATH=256 convert.cpp -o convert.o
descattr.h:53: warning: attribute ignored in declaration of 'struct NTXDescriptor'
descattr.h:53: warning: attribute for 'struct NTXDescriptor' must follow the 'struct' keyword
ntxshape.h:47: warning: 'stdcall' attribute directive ignored
ntxshape.h:49: warning: 'stdcall' attribute directive ignored
ntxshape.h:50: warning: 'stdcall' attribute directive ignored
convert.cpp:88: warning: 'stdcall' attribute directive ignored
gcc -o ntxshape stripext.o convert.o libntxshape.a -lstdc++ -lm
/usr/ccs/bin/ld: libntxshape.a: Missing library symbol table
collect2: ld returned 1 exit status
gmake: *** [ntxshape] Error 1