pg 7.01 and cygwin environment

Dear all

I try to compile a program package to run under cygwin. I compiled the package under linux -with some problems- , however, with a considerable gain in execution speed. All programs are c++ coded.
Using pgi under windows (not the SUA or SFU version) in the pgi supplied cygwin enironment the following problems and questions occur:

  1. the compiler does not find all the header files in the include dirs. When I simply replace pgcpp with gcc, it works.
  2. Cygwin wants *.a lib files, the windows pgi wants *. lib lib files. There is a wrapper for lib files supplied, but ar creates *.a libs in my programs. Can I simply rename the *.a libs to *.lib? Can I generally switch to *a.libs somehow? The drivers in the pgi/man directory seem to do something like that.
  3. Can I link cygwin gcc generated *.a libs with pgcc files?

Thanks a lot

a_bra

Hi a_bra,

You will need to pass the drive in a : format.
For example:

% pgcc -Ic:/tmp main.c

/c/tmp wouldn’t work.

  1. Cygwin wants *.a lib files, the windows pgi wants *. lib lib files. There is a wrapper for lib files supplied, but ar creates *.a libs in my programs. Can I simply rename the *.a libs to *.lib? Can I generally switch to *a.libs somehow? The drivers in the pgi/man directory seem to do something like that.

This is the same as (1), if you link with .a , you will need to give a full path to .a unless it is in local directory. I compile: pgcc main.c libme.a and it works just fine.

  1. Can I link cygwin gcc generated *.a libs with pgcc files?

Maybe. Is your gcc from SUA? You can compile using cl and link with pgcc.

Hongyon

Thanks a lot

a_bra[/quote]__

Dear Hongyon

Thank you, the path issue is solved.
Could you shortly specify the cl option from quote 3. Is meant for gcc or pgcpp. I did not find it in either.

I have another problem now. I get errors during compilation in the cygwin environment that do not occur for the same code with Linux. I mostly get errors 307, 256 792 and 20, all some definition problems more or less. They seem not to be related to the windows headers. Any idea?

How can I suppress an error? The error_suppress option seems not to work. I tried -error_supress 307 or #307 without any effect.

Thank you

Hi,

You will need to have Microsoft Visual studio to have cl. It is Microsoft C/C++ compiler.

You will need to post the error her as I am not sure what those errors are.

Hongyon

Dear Hongyon

Thanks for the answer

These are the error messages from 2 files I get under cygwin. All this does not happen with Linux.

I would appreciate your help

A_bra


“e:\fsl4.1-pgcc-clean\src\fast\zimage/common/handler.cpp”, line 39: error #20:
identifier “_set_new_handler” is undefined
_set_new_handler(new_failed);
^

“C:/Programme/PGI/Microsoft Open Tools 8/PlatformSDK/include/wingdi.h”, line 688: error #256:
invalid redeclaration of type name “BITMAPINFOHEADER” (declared at
line 27 of “zimage/imagebase/bitmap.h”)
} BITMAPINFOHEADER, FAR *LPBITMAPINFOHEADER, *PBITMAPINFOHEADER;
^

“C:/Programme/PGI/Microsoft Open Tools 8/PlatformSDK/include/wingdi.h”, line 761: error #256:
invalid redeclaration of type name “BITMAPINFO” (declared at line 42
of “zimage/imagebase/bitmap.h”)
} BITMAPINFO, FAR *LPBITMAPINFO, *PBITMAPINFO;
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/image.cpp”, line 1394: error #792:
“double Opt<ZRGB>::min” is not an entity that can be
explicitly specialized
template <> double Opt< ZRGB >::min = 0; //MinValue();
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/image.cpp”, line 1395: error #792:
“double Opt<ZRGB>::max” is not an entity that can be
explicitly specialized
template <> double Opt< ZRGB >::max = 255; //MaxValue();
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/image.cpp”, line 1396: error #792:
“double Opt<ZRGB>::min” is not an entity that can be
explicitly specialized
template <> double Opt< ZRGB >::min = -32768.0; //MinValue();
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/image.cpp”, line 1397: error #792:
“double Opt<ZRGB>::max” is not an entity that can be
explicitly specialized
template <> double Opt< ZRGB >::max = 32767; //MaxValue();
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/image.cpp”, line 1398: error #792:
“double Opt<ZRGB>::min” is not an entity that can be
explicitly specialized
template <> double Opt< ZRGB >::min = 0; //MinValue();
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/image.cpp”, line 1399: error #792:
“double Opt<ZRGB>::max” is not an entity that can be
explicitly specialized
template <> double Opt< ZRGB >::max = 65536; // MaxValue();
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/image.cpp”, line 1400: error #792:
“double Opt<ZRGB>::min” is not an entity that can be explicitly
specialized
template <> double Opt< ZRGB >::min = -2147483648.0; //MinValue();
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/image.cpp”, line 1401: error #792:
“double Opt<ZRGB>::max” is not an entity that can be explicitly
specialized
template <> double Opt< ZRGB >::max = 2147483647.0; //MaxValue();
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/image.cpp”, line 1404: error #792:
“double Opt<ZRGB>::min” is not an entity that can be
explicitly specialized
template <> double Opt< ZRGB >::min = -2147483648.0; //MinValue();
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/image.cpp”, line 1405: error #792:
“double Opt<ZRGB>::max” is not an entity that can be
explicitly specialized
template <> double Opt< ZRGB >::max = 2147483647.0; //MaxValue();
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/imagebase.cpp”, line 516: error #147:
declaration is incompatible with
"bool ZImageBase::FillBitmapInfo(BITMAPINFO ) const" (declared at
line 287 of “zimage/imagebase/imagebase.h”)
bool ZImageBase::FillBitmapInfo(BITMAPINFO
pbmpinfo) const
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imagebase/imagebase.cpp”, line 547: error #147:
declaration is incompatible with
“void ZImageBase::FillBitmapInfoHeader(BITMAPINFOHEADER &) const”
(declared at line 288 of “zimage/imagebase/imagebase.h”)
void ZImageBase::FillBitmapInfoHeader(BITMAPINFOHEADER& bmpinfoheader) const
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imageio/fileavw.cpp”, line 24: error #144:
a value of type “const char *” cannot be used to initialize an
entity of type "char "
char
ext=strrchr(fname, ‘.’);
^

“e:\fsl4.1-pgcc-clean\src\fast\zimage/imageio/imagereader.cpp”, line 79: error #144:
a value of type “const char *” cannot be used to initialize an
entity of type "char "
char
PosOfLastDot = strrchr(fname, ‘.’);
^

17 errors detected in the compilation of “mriseg.cpp”.



pgcpp -w -fast -D__PGI -Ie:/fsl4.1-pgcc-clean/extras/include/newmat -Ie:/fsl4.1-pgcc-clean/extras/include/zlib -I. -Ie:/fsl4.1-pgcc-clean/include -Ie:/fsl4.1-pgcc-clean/include -c -o newimagefns.o newimagefns.cc
“e:\fsl4.1-pgcc-clean\src\newimage\newimagefns.h”, line 1349: error #307:
redefinition of default argument
volume susan_convolve(const volume source, const volume& kernel, const float sigmabsq, const bool use_median, int num_usan,volume* usan_area = new volume(1,1,1),volume usan_vol1=volume(1,1,1),const float sigmab1sq=0,volume usan_vol2 = volume(1,1,1),const float sigmab2sq=0)
^

“e:\fsl4.1-pgcc-clean\src\newimage\newimagefns.h”, line 1481: error:
redefinition of default argument
volume convolve(const volume& source, const volume& kernel,
^

“e:\fsl4.1-pgcc-clean\src\newimage\newimagefns.h”, line 1564: error:
redefinition of default argument
volume convolve_separable(const volume& source,
^

“e:\fsl4.1-pgcc-clean\src\newimage\newimagefns.h”, line 2014: error:
redefinition of default argument
volume4D generic_convolve(const volume4D& source, const volume& kernel, bool seperable=false, bool normal=true)
^

4 errors detected in the compilation of “newimagefns.cc”.
make: *** [newimagefns.o] Error 2

Hi,

Before I investigate further, I would like to get more information about the application you compile. I assume this is not your own application. Is this publicly available program? What is it? You might want to check with the author if they have ported to windows and have windows version available. From the error below, I am guessing that the version you have is not ported to windows.

Hongyon

Dear Hongyon

Thank you for the reply. Your questions are absolutely o.k, but can I contact you directly for them?

Hi,

Are you them? Of course, we are happy to help if this is a compiler issue.

Hongyon