FMGCFMGC | 1 Oct 11:37 2004
Picon

Re: fortran link failures

Hello!

On my system, after default installation of MinGW-3.1.0-1.exe, AND 
adjusting the PATH environment variable, as specified in the 
documentation, it works out of the box. Between other things the 
installation program not setting the PATH environment variable allows 
you to use different compilers (including different versions of MinGW). 
Following is a log of my session:

Observe that when you mix C and Fortran functions/subroutines, and link 
with gcc, you must explicitly add to the link the g2c library and this 
behaviour is documented.

Also note that when you call C functions/subroutines from Fortran, g77 
expects their names end with '_' (see the file "gccp2.c" below)

<session.log>
D:\g77test>path=%path%;d:\MinGW\bin

D:\g77test>mingw32-make
g77 -s -Wall -W -o p1.exe p1.f
g77 -s -Wall -W -c g77p2.f -o g77p2.o
gcc -s -Wall -W p2linkedwithgcc.c g77p2.o -lg2c -o p2linkedwithgcc.exe
gcc -s -Wall -W -c gccp2.c -o gccp2.o
g77 -s -Wall -W p2linkedwithg77.f gccp2.o -o p2linkedwithg77.exe

D:\g77test>p1
 hello g77

D:\g77test>p2linkedwithgcc
(Continue reading)

Benjamin Riefenstahl | 1 Oct 14:31 2004
Picon

Re: Question about compilation problem with g++

Hi Vivek,

Vivek Jishtu writes:
> The problem is that I am trying to port a library to Mingw [...]

Well, we can't fix *that* problem (that you are trying to port that
library ;-)).  But I assume you have some other problem, too, that you
wanted to ask about?

> class Second
> {
>
> public:
>     void myfun(First &obj)
>
> [...]
>
>  Second Obj2;
>  Obj2.myfun(First());

You don't mention it, but you are probably gettting an error here.
Temporary objects are automatically considered const in this situation
in standard C++.  So your code is passing a const object to a method
that expects a non-const reference.

You'll have to port the code to standard C++ to make it work with a
standard C++ compiler.  Consider compile-time errors as getting help
in that project.

In this case either change myfun() to take a const reference, or use
(Continue reading)

Aaron W. LaFramboise | 2 Oct 04:03 2004

Re: Borland compatibility in windres

Ryan Underwood wrote:
> I posted this patch to the binutils mailing list without much of a
> response.  I'm wondering if anyone here thinks it is useful.  It allows
> windres to compile Borland-style inline resources that are in the form
> of quoted hexadecimal strings.  This was useful to me in porting a
> Borland application which had a large number of inline resources.

Hey, just out of curiousity, does this let you do anything that you
can't do using using the ordinary user-defined resource syntax?

See
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/tools/rcdata_resource.asp>.

Irregardless, if your patch adds a syntax that at least one other
resource compiler has, doesn't conflict with common usage in windres'
present syntax, and is otherwise well-formed, I think it is a good thing.

Aaron W. LaFramboise

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
(Continue reading)

Ryan Underwood | 2 Oct 21:56 2004
Picon

Re: Borland compatibility in windres


On Fri, Oct 01, 2004 at 09:03:41PM -0500, Aaron W. LaFramboise wrote:
> Ryan Underwood wrote:
> > I posted this patch to the binutils mailing list without much of a
> > response.  I'm wondering if anyone here thinks it is useful.  It allows
> > windres to compile Borland-style inline resources that are in the form
> > of quoted hexadecimal strings.  This was useful to me in porting a
> > Borland application which had a large number of inline resources.
> 
> Hey, just out of curiousity, does this let you do anything that you
> can't do using using the ordinary user-defined resource syntax?

Yes.

resname BITMAP
{
 '0a 0d ba 13 15 16 15 13 00 00 00 00 00 00 00 00'
 ' .... '
}

In the first place, the Borland resource compiler allows this inline
form for types other than RCDATA (at least BITMAP, CURSOR, and ICON,
perhaps others, but nobody else could give me such information).
Additionally, it allows a quoted hexadecimal array.  I don't know if the
MS resource compiler allows this, but nobody could tell me that either,
and it's not mentioned in MSDN.

I've posted on newsgroups about this, on the binutils list repeatedly,
on the mingw list, was directed to privately email a developer who
growled at me, and posted a patch in the mingw tracker that was
(Continue reading)

GUSTO COMPONENTS | 3 Oct 12:20 2004

im beginner

dear from the group thaks very much to accept this novice around.i woul like to lear c languaje my level is real very slow i woul like toknow if i can get information around this group to develop knowlege about c . 
best regard to every one
 
armando alvarado  

ALL-NEW Yahoo! Messenger - all new features - even more fun!
Norman Vine | 3 Oct 14:31 2004

RE: [osg-user]Problems with GDAL supported textures and osgdem.

Gordon Tomlinson writes:
> 
> On Windozes you have to use _stat64
> 
> E.g.
> 
> #include <sys/types.h>
> #include <sys/stat.h>
> 
> struct __stat64 statbuf;
> 
>  if ( _stat64( fileName, &statbuf ) == 0 )
>     return statbuf.st_size;

That seems to work with VC6 sp6 
but does not work with MINGW    grrrr  ....

../FileUtils.cpp: In function `bool osgDB::makeDirectory(const std::string&)':
../FileUtils.cpp:66: error: `_stat64' undeclared (first use this function)

I will investigate further as I *much* prefer being able to 
use gcc.

Thanks

Norman

> 
> -----Original Message-----
> From: osg-user-admin@... [mailto:osg-user-admin <at> dburns.dhs.org]
> On Behalf Of Norman Vine
> Sent: 03 October 2004 11:48
> To: osg-user@...
> Subject: RE: [osg-user]Problems with GDAL supported textures and osgdem.
> 
> Robert Osfield writes:
> >> 
> > I've changed the FilUtils.cpp code across to use stat64, it compiles 
> > ok under Linux, fingers crossed it'll servived the cross platform 
> > build.  This change is now checked in.
> 
> I don't think this will work on Windows  ..  
> unless one is running Cygwin
> 
> GDAL wiggles around this issue in these files gdal / port / cpl_vsi.h gdal /
> port / cpl_vsil_XXX.cpp
> 
> HTH
> 
> Norman
> 
> $ gcc --version
> gcc.exe (GCC) 3.4.2 (mingw-special)
> 
> ../FileUtils.cpp: In function `bool osgDB::makeDirectory(const
> std::string&)':
> ../FileUtils.cpp:65: error: aggregate `stat64 stbuf' has incomplete type and
> cannot be defined
> ../FileUtils.cpp:66: error: invalid use of undefined type `struct stat64'
> ../FileUtils.cpp:65: error: forward declaration of `struct stat64'
> ../FileUtils.cpp:85: error: invalid use of undefined type `struct stat64'
> ../FileUtils.cpp:65: error: forward declaration of `struct stat64'
> ../FileUtils.cpp: In function `osgDB::FileType osgDB::fileType(const
> std::string&)':
> ../FileUtils.cpp:151: error: aggregate `stat64 fileStat' has incomplete type
> and cannot be defined
> ../FileUtils.cpp:152: error: invalid use of undefined type `struct stat64'
> ../FileUtils.cpp:151: error: forward declaration of `struct stat64'
> ../FileUtils.cpp: At global scope:
> ../FileUtils.cpp:166: warning: unused parameter 'caseSensitivity'
> make[3]: *** [FileUtils.o] Error 1
> 
> 
> _______________________________________________
> osg-user mailing list
> osg-user@...
> http://dburns.dhs.org/mailman/listinfo/osg-user
> 
> 
> _______________________________________________
> osg-user mailing list
> osg-user@...
> http://dburns.dhs.org/mailman/listinfo/osg-user
> 

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

Brian Kropf | 3 Oct 14:47 2004

Re: RE: [osg-user]Problems with GDAL supported textures and osgdem.

What version of WinAPI are you using?  It's there with my version (3.1), I haen't investigated it at all, but I know that MinGW doesn't add the leading underscore to names as often as VC does.  You might want to try something like::

typedef __stat64 _stat64;

I don't actually know if that'll work, but...

Here's the output of a search for __stat64 in the MinGW include directory:

$ grep -r __stat64 /mingw/include/*
/mingw/include/sys/stat.h:struct __stat64
/mingw/include/sys/stat.h:_CRTIMP int __cdecl _fstat64 (int, struct __stat64*);
/mingw/include/sys/stat.h:_CRTIMP int __cdecl _stat64 (const char*, struct __stat64*);
/mingw/include/sys/stat.h:_CRTIMP int __cdecl _wstat64 (const wchar_t*, struct __stat64*);
/mingw/include/wchar.h:struct __stat64
/mingw/include/wchar.h:_CRTIMP int __cdecl _wstat64 (const wchar_t*, struct __stat64*);

-brian

Norman Vine wrote:
Gordon Tomlinson writes:
On Windozes you have to use _stat64 E.g. #include <sys/types.h> #include <sys/stat.h> struct __stat64 statbuf; if ( _stat64( fileName, &statbuf ) == 0 ) return statbuf.st_size;
That seems to work with VC6 sp6 but does not work with MINGW grrrr .... ../FileUtils.cpp: In function `bool osgDB::makeDirectory(const std::string&)': ../FileUtils.cpp:66: error: `_stat64' undeclared (first use this function) I will investigate further as I *much* prefer being able to use gcc. Thanks Norman
-----Original Message----- From: osg-user-admin <at> dburns.dhs.org [mailto:osg-user-admin <at> dburns.dhs.org] On Behalf Of Norman Vine Sent: 03 October 2004 11:48 To: osg-user <at> dburns.dhs.org Subject: RE: [osg-user]Problems with GDAL supported textures and osgdem. Robert Osfield writes:
I've changed the FilUtils.cpp code across to use stat64, it compiles ok under Linux, fingers crossed it'll servived the cross platform build. This change is now checked in.
I don't think this will work on Windows .. unless one is running Cygwin GDAL wiggles around this issue in these files gdal / port / cpl_vsi.h gdal / port / cpl_vsil_XXX.cpp HTH Norman $ gcc --version gcc.exe (GCC) 3.4.2 (mingw-special) ../FileUtils.cpp: In function `bool osgDB::makeDirectory(const std::string&)': ../FileUtils.cpp:65: error: aggregate `stat64 stbuf' has incomplete type and cannot be defined ../FileUtils.cpp:66: error: invalid use of undefined type `struct stat64' ../FileUtils.cpp:65: error: forward declaration of `struct stat64' ../FileUtils.cpp:85: error: invalid use of undefined type `struct stat64' ../FileUtils.cpp:65: error: forward declaration of `struct stat64' ../FileUtils.cpp: In function `osgDB::FileType osgDB::fileType(const std::string&)': ../FileUtils.cpp:151: error: aggregate `stat64 fileStat' has incomplete type and cannot be defined ../FileUtils.cpp:152: error: invalid use of undefined type `struct stat64' ../FileUtils.cpp:151: error: forward declaration of `struct stat64' ../FileUtils.cpp: At global scope: ../FileUtils.cpp:166: warning: unused parameter 'caseSensitivity' make[3]: *** [FileUtils.o] Error 1 _______________________________________________ osg-user mailing list osg-user <at> dburns.dhs.org http://dburns.dhs.org/mailman/listinfo/osg-user _______________________________________________ osg-user mailing list osg-user <at> dburns.dhs.org http://dburns.dhs.org/mailman/listinfo/osg-user
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ MinGW-users mailing list MinGW-users <at> lists.sourceforge.net You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users

Norman Vine | 3 Oct 15:36 2004

RE: RE: [osg-user]Problems with GDAL supported textures and osgdem.

Brian Kropf writes:

> What version of WinAPI are you using?  It's there with my version (3.1), 
> I haen't investigated it at all, but I know that MinGW doesn't add the leading underscore to 
> names as often as VC does.  You might want to try something like::

> typedef __stat64 _stat64;

> I don't actually know if that'll work, but...

> Here's the output of a search for __stat64 in the MinGW include directory:

> $ grep -r __stat64 /mingw/include/*
> /mingw/include/sys/stat.h:struct __stat64
> /mingw/include/sys/stat.h:_CRTIMP int __cdecl _fstat64 (int, struct __stat64*);
> /mingw/include/sys/stat.h:_CRTIMP int __cdecl _stat64 (const char*, struct __stat64*);
> /mingw/include/sys/stat.h:_CRTIMP int __cdecl _wstat64 (const wchar_t*, struct __stat64*);
> /mingw/include/wchar.h:struct __stat64
> /mingw/include/wchar.h:_CRTIMP int __cdecl _wstat64 (const wchar_t*, struct __stat64*);

Thanks Brian

This appears to be a libmsvcrt version related issue see
http://sourceforge.net/mailarchive/message.php?msg_id=7374474

by using the techniques described in the message linked above
and commenting out the lines
#ifdef  __MSVCRT_VERSION__ >= 0x0601
in sys/stat.h 

I can successfully compile using _stat64()

but this is a *bit* of a hack

Is there a standardized way of using libmsvcr71.a ??

TIA

Norman

Norman Vine wrote: 
Gordon Tomlinson writes:

On Windozes you have to use _stat64

E.g.

#include <sys/types.h>
#include <sys/stat.h>

struct __stat64 statbuf;

 if ( _stat64( fileName, &statbuf ) == 0 )
    return statbuf.st_size;

That seems to work with VC6 sp6 
but does not work with MINGW    grrrr  ....

../FileUtils.cpp: In function `bool osgDB::makeDirectory(const std::string&)':
../FileUtils.cpp:66: error: `_stat64' undeclared (first use this function)

I will investigate further as I *much* prefer being able to 
use gcc.

Thanks

Norman

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

Jerry van Dijk | 3 Oct 16:11 2004
Picon

build problem 3.4.2


Hi,

After a long time I am trying to build gcc 3.4.2 (core + ada) using msys 
(devkit installed). Using the recomended settings the build breaks:

  cd ./fixinc && \
  /bin/sh ${srcdir}/mkfixinc.sh i386-pc-mingw32 i386-pc-mingw32)
  constructing ../fixinc.sh for i386-pc-mingw32 to run on i386-pc-mingw32
  The directory that should contain system headers does not exist:
    /usr/include
  make[2]: *** [stmp-fixinc] Error 1
  make[2]: Leaving directory `/d/projects/gnat/build/gcc'
  make[1]: *** [stage1_build] Error 2
  make[1]: Leaving directory `/d/projects/gnat/build/gcc'
  make: *** [bootstrap] Error 2

using binaries 3.4.2, binutils 2.15.91, bison 1.875, msys make, runtime 3.5,
w32api 3.1.

Any suggestions where to look ?

TIA,
Jerry.

--  Jerry van Dijk
--  Leiden, Holland
--
-- 'Tradition is not the worship of ashes, but the preservation of fire."
--                                              Gustav Mahler (1860-1911)

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

Aaron W. LaFramboise | 3 Oct 17:55 2004

Re: im beginner

Hi Armando,

Yes, this group will usually answer general programming questions, or
direct one to where he might learn the answer.

A good C tutorial for an absolute beginner is Steve Summit's C tutorial:
http://www.eskimo.com/~scs/cclass/cclass.html

Aaron W. LaFramboise

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users


Gmane