nam ake | 16 Nov 15:58 2014
Picon

wcswidth

I've been searched in wchar.h this function.
yet I can't find where it is located.

can anyone point me where wcswidth located?

thanx
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe
chivin90 | 11 Nov 23:56 2014
Picon

Error compiling complex.h with c++ (GCC 4.8.1)

I wrote code for complex numbers using include file <Mingw /include
/complex.h> . When I compile the file

>> gcc test.c -o test.exe
works correctly. However, when I compile another file <fft.c> where by
>> c ++ -o fft.c fft.exe
I have the following error:

fft.c:420:23: error: ISO c++ forbids declaration of declaration of 'make_cv'
with no type [-fpermissive] 
   complex* make_cv(int n){

fft.c: In function '__complex__' int* make_cv(int)': 
ftt.c:421:20:error: ISO C++ forbids declaration of 'type name' with no type
[-fpermissive]
   return (complex*)malloc(sizeof(complex)*n);

fft.c: 16:17: error: ISO C++ forbids declaration of 'type name'  with no
type[-fpermissive]
   #define complex _Complex

fft.c:421:38: note: in expansion of macro 'complex'
   return (complex*) malloc(sizeof(complex)*n);

The source code of the function is as follows
#ifndef complex
#define complex _Complex
#endif
complex* make_cv(int n) {
    return (complex*) malloc(sizeof (complex) * n);
}

I am using c++ (GCC 4.8.1).

Chivin

--
View this message in context: http://mingw.5.n7.nabble.com/Error-compiling-complex-h-with-c-GCC-4-8-1-tp34028.html
Sent from the MinGW - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Earnie Boyd | 10 Nov 22:14 2014
Picon
Picon

Fwd: 32+64-bit[+arm?] target version of MSYS

---------- Forwarded message ----------
From:  <jmichae3@...>
Date: Sun, Nov 2, 2014 at 3:16 AM
Subject: 32+64-bit[+arm?] target version of MSYS
To: earnie@...

do I need to add a target for ARM? I hear this is in process.
it would not be hard to add another target, there are few changes.
basically it's a copy of the same MSYS folder, but reoriented towards
a 64-bit target compiler, and another towards a 32-bit compiler, ...

I noticed you wrote the postinstall script. may I modify it somewhat?

http://www.mingw.org/msysdvlpr.shmtl

the above page in the /msys/postinstall/pi.sh is now a 404 error.

I needed to have it do several extra things:
- if no /etc/fstab exists, show and offer to copy /etc/fstab.sample to
/etc/fstab. it has some sample stuff for wxwidgets target dirs for 32
and 64-bit, boost 32 and 64-bit, etc, and 32 and 64-bit target
compiler and 32 and 64-bit host combinations depending on your
platform and compiler selection.

if no ~/.profile exists, offer to copy my helpful new
/postinstall/sample.profile to ~/.profile

these are the changes to the readme I propose to append:

11/1/2014 jmichae3
profile, /etc/fstab.sample Reworked and retargeted for 32+64-bit
compilation by using separate installs by jmichae3

The way to get started is by copying
MSYS-20111123-64\msys\etc\fstab.sample to MSYS-20111123-64\msys\etc\fstab
and then editing fstab, you can use any text editor you like.
then, edit MSYS-20111123-64\msys\etc\profile

a home .profile (/postinstall/sample.profile) will be offered to
copy to ~/.profile (the home dir). the /postinstall/pi.sh script has been
modified do do this.
if you wish to do a manual copy or merge in the changes, winmerge
works pretty well.
http://sf.net/projects/winmerge

compiler selection of 32 (32h) or 64-bit (64h) host is performed by
renaming the text /mingw64h64t in ~/.profile or commenting/uncommenting
and you can edit it with your favorite editor or vim.
( MSYS-20111123-64\msys\home\%USERNAME%.profile )
and you can edit it with your favorite editor or vim.
Example: the above is a 64-bit host (64h). to use a 32-bit host compiler,
change /mingw64h64t to /mingw32h64t and you won't have to change
/etc/fstab and ~/.profile unless you install a new compiler version.
in ~/.profile you may or may not have to change compilertype, but you
probably will have to change
compilerversion

you can find vim command help at
http://www.cs.cornell.edu/courses/cs312/2006fa/software/quick-vim.pdf
you will find that notepad doesn't handle *nix line endings well.

________________________________

This message was sent to you via the SourceForge web mail form.
You may reply to this message directly, or at
http://sourceforge.net/u/jmichae3/profile/send_message

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Ricardo Viegas | 10 Nov 20:49 2014

Re: error in compiling/linking a C program

How should I proceed to "re-install Binutils" or to "install a previous version of them"? Sorry, but my
knowledge does not reach as deeply - I only know how to install MinGW using the "mingw-get-setup.exe"
program, from SourceForge .
Thx!
(just as a additional info: For the 3rd time, I have just deleted and installed MinGW)

> -----Original Message-----
> From: eliz@...
> Sent: Mon, 10 Nov 2014 15:50:50 +0200
> To: viegas@...
> Subject: Re: [Mingw-users] error in compiling/linking a C program
> 
>> Date: Mon, 10 Nov 2014 04:47:23 -0800
>> From: Ricardo Viegas <viegas@...>
>> Cc: mingw-users@...
>> 
>> D:\Programas\C>c:\mingw\libexec\gcc\mingw32\4.8.1\collect2 --help
>> Usage: collect2 [options]
>>  Wrap linker and generate constructor code if needed.
>>  Options:
>>   -debug          Enable debug output
>>   --help          Display this information
>>   -v, --version   Display this program's version number
>> 
>> Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html
>> Report bugs: <http://gcc.gnu.org/bugs.html>
> 
> That's much less that should have been printed.  Your collect2.exe is
> for some reason unable to invoke ld.exe, the linker.  Perhaps
> re-install Binutils, or maybe install a previous version of them.

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Ricardo Viegas | 10 Nov 13:47 2014

Re: error in compiling/linking a C program

Output for the "help" option for the "collect2" program:

C:\Users\Ricardo>lingc

D:\Programas\C>c:\mingw\libexec\gcc\mingw32\4.8.1\collect2 --help
Usage: collect2 [options]
 Wrap linker and generate constructor code if needed.
 Options:
  -debug          Enable debug output
  --help          Display this information
  -v, --version   Display this program's version number

Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html
Report bugs: <http://gcc.gnu.org/bugs.html>

D:\Programas\C>

> -----Original Message-----
> From: eliz@...
> Sent: Mon, 10 Nov 2014 07:03:23 +0200
> To: viegas@...
> Subject: Re: [Mingw-users] error in compiling/linking a C program
> 
>> Date: Sun, 9 Nov 2014 06:25:07 -0800
>> From: Ricardo Viegas <viegas@...>
>> 
>> Additional point: A minute ago, I just moved the "C:\MinGW\bin" entry to
>> be the very first one at the "PATH" system variable.
>> Again, same results.
> 
> What does the following command display, when invoked from a cmd.exe
> window:
> 
>   c:\mingw\libexec\gcc\mingw32\4.8.1\collect2 --help

____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Ricardo Viegas | 10 Nov 13:43 2014

Re: error in compiling/linking a C program

I just used Kedit to create a "bat" file, saved it and executed it and it worked fine, meaning the directory is not write protected:

D:\Programas\C>KEDITW32 TEST.BAT
D:\Programas\C>TEST
D:\Programas\C>REM HELLO! HELLO! HELLO!
D:\Programas\C>

-----Original Message-----
From: br.renatosilva <at> gmail.com
Sent: Mon, 10 Nov 2014 00:40:58 -0200
To: mingw-users <at> lists.sourceforge.net
Subject: Re: [Mingw-users] error in compiling/linking a C program

2014-11-09 12:25 GMT-02:00 Ricardo Viegas <viegas <at> inbox.com>:
> Additional point: A minute ago, I just moved the "C:\MinGW\bin" entry to be the very first one at the "PATH" system variable.
> Again, same results.

Maybe an obvious question, but do you have write permissions in the directory? Didn't ld output any error message? This is what I get for a permission error:

c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot open output file a.exe: Permission denied
collect2.exe: error: ld returned 1 exit status


Free 3D Earth Screensaver
Watch the Earth right on your desktop!Check it out at www.inbox.com/earth
------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe
Ricardo Viegas | 9 Nov 15:25 2014

Re: error in compiling/linking a C program

Additional point: A minute ago, I just moved the "C:\MinGW\bin" entry to be the very first one at the "PATH"
system variable.
Again, same results.

> -----Original Message-----
> From: viegas@...
> Sent: Sun, 9 Nov 2014 06:01:06 -0800
> To: eliz@...
> Subject: Re: [Mingw-users] error in compiling/linking a C program
> 
> I don't know how to check what you mentioned ("Make sure these all came
> from a MinGW distribution (and not from MSYS, for example)"), so I
> deleted the "C:\MinGW" directory and reinstalled MinGW again, but this
> time only with the "mingw32-base" option (without
> "mingw-developer-toolkit" and "msys-base").
> The problem ocurred again, exactly the same.
> 
>> -----Original Message-----
>> From: eliz@...
>> Sent: Sun, 09 Nov 2014 05:41:58 +0200
>> To: viegas@...
>> Subject: Re: [Mingw-users] error in compiling/linking a C program
>> 
>>> Date: Sat, 8 Nov 2014 13:49:10 -0800
>>> From: Ricardo Viegas <viegas@...>
>>> Cc: mingw-users@...
>>> 
>>> "ld.exe" is at "C:\MinGW\bin", that is in the path system variable:
>>> 
>>> D:\Programas\C>ld --version
>>> GNU ld (GNU Binutils) 2.24
>>> Copyright 2013 Free Software Foundation, Inc.
>>> This program is free software; you may redistribute it under the terms
>>> of
>>> the GNU General Public License version 3 or (at your option) a later
>>> version.
>>> This program has absolutely no warranty.
>> 
>> Well, somehow collect2 cannot invoke it, or maybe the LTO wrapper, to
>> link your program.  Make sure these all came from a MinGW distribution
>> (and not from MSYS, for example).
> 
> ____________________________________________________________
> FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on
> your desktop!
> Check it out at http://www.inbox.com/marineaquarium
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> MinGW-users mailing list
> MinGW-users@...
> 
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same.  Disregard for the list
> etiquette may cause your account to be moderated.
> 
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> Also:
> mailto:mingw-users-request@...?subject=unsubscribe

____________________________________________________________
Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
Check it out at http://mysecurelogon.com/manager

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Ricardo Viegas | 9 Nov 15:01 2014

Re: error in compiling/linking a C program

I don't know how to check what you mentioned ("Make sure these all came from a MinGW distribution (and not
from MSYS, for example)"), so I deleted the "C:\MinGW" directory and reinstalled MinGW again, but this
time only with the "mingw32-base" option (without "mingw-developer-toolkit" and "msys-base").
The problem ocurred again, exactly the same.

> -----Original Message-----
> From: eliz@...
> Sent: Sun, 09 Nov 2014 05:41:58 +0200
> To: viegas@...
> Subject: Re: [Mingw-users] error in compiling/linking a C program
> 
>> Date: Sat, 8 Nov 2014 13:49:10 -0800
>> From: Ricardo Viegas <viegas@...>
>> Cc: mingw-users@...
>> 
>> "ld.exe" is at "C:\MinGW\bin", that is in the path system variable:
>> 
>> D:\Programas\C>ld --version
>> GNU ld (GNU Binutils) 2.24
>> Copyright 2013 Free Software Foundation, Inc.
>> This program is free software; you may redistribute it under the terms
>> of
>> the GNU General Public License version 3 or (at your option) a later
>> version.
>> This program has absolutely no warranty.
> 
> Well, somehow collect2 cannot invoke it, or maybe the LTO wrapper, to
> link your program.  Make sure these all came from a MinGW distribution
> (and not from MSYS, for example).

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
Check it out at http://www.inbox.com/marineaquarium

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Ricardo Viegas | 8 Nov 22:49 2014

Re: error in compiling/linking a C program

"ld.exe" is at "C:\MinGW\bin", that is in the path system variable:

D:\Programas\C>ld --version
GNU ld (GNU Binutils) 2.24
Copyright 2013 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

[In the previous email I used "Reply", instead of "Reply All". Sorry about that]

> -----Original Message-----
> From: eliz@...
> Sent: Sat, 08 Nov 2014 19:32:54 +0200
> To: viegas@...
> Subject: Re: [Mingw-users] error in compiling/linking a C program
> 
> [Why private email?]
> 
>> Date: Sat, 8 Nov 2014 07:49:52 -0800
>> From: Ricardo Viegas <viegas@...>
>> 
>> Hi Eli!
>> Here comes output 2.
>> Thanks for your patience and interest!
>> Regards, Ricardo
>> -------------------------------------------
>> 
>> C:\Users\Ricardo>LINGC
>> 
>> D:\Programas\C>gcc -v -Wl,--verbose teste1.c
>> Using built-in specs.
>> COLLECT_GCC=gcc
>> COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
>> Target: mingw32
>> Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32
>> --build=m
>> ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld
>> --enable-lto
>> --enable-libssp --disable-multilib
>> --enable-languages=c,c++,fortran,objc,obj-c++
>> ,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry
>> --enable-l
>> ibstdcxx-debug --enable-version-specific-runtime-libs
>> --with-gmp=/usr/src/pkg/gm
>> p-5.1.2-1-mingw32-src/bld
>> --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --
>> with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes
>> --enable-
>> libgomp --enable-threads --with-libiconv-prefix=/mingw32
>> --with-libintl-prefix=/
>> mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
>> Thread model: win32
>> gcc version 4.8.1 (GCC)
>> COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
>>  c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/cc1.exe -quiet -v -iprefix
>> c:\mingw\b
>> in\../lib/gcc/mingw32/4.8.1/ teste1.c -quiet -dumpbase teste1.c
>> -mtune=generic -
>> march=pentiumpro -auxbase teste1 -version -o d:\Temp\cc64nzje.s
>> GNU C (GCC) version 4.8.1 (mingw32)
>>         compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version
>> 3.1.2,
>> MPC version 1.0.1
>> GGC heuristics: --param ggc-min-expand=100 --param
>> ggc-min-heapsize=131072
>> ignoring duplicate directory
>> "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/inclu
>> de"
>> ignoring duplicate directory
>> "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/../..
>> /../../include"
>> ignoring nonexistent directory "/mingw/include"
>> ignoring duplicate directory
>> "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/inclu
>> de-fixed"
>> ignoring duplicate directory
>> "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/../..
>> /../../mingw32/include"
>> ignoring nonexistent directory "/mingw/include"
>> #include "..." search starts here:
>> #include <...> search starts here:
>>  c:\mingw\bin\../lib/gcc/mingw32/4.8.1/include
>>  c:\mingw\bin\../lib/gcc/mingw32/4.8.1/../../../../include
>>  c:\mingw\bin\../lib/gcc/mingw32/4.8.1/include-fixed
>>  c:\mingw\bin\../lib/gcc/mingw32/4.8.1/../../../../mingw32/include
>> End of search list.
>> GNU C (GCC) version 4.8.1 (mingw32)
>>         compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version
>> 3.1.2,
>> MPC version 1.0.1
>> GGC heuristics: --param ggc-min-expand=100 --param
>> ggc-min-heapsize=131072
>> Compiler executable checksum: 767202a405449496e68a54c4eee91a28
>> COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
>>  c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/as.exe -v
>> -o d:\T
>> emp\ccABlV1b.o d:\Temp\cc64nzje.s
>> GNU assembler version 2.24 (mingw32) using BFD version (GNU Binutils)
>> 2.24
>> COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/;c:/mingw/bin/../libexec
>> /gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/
>> LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.8.1/;c:/mingw/bin/../lib/gcc/;c:/
>> mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib/;c:/mingw/bin/../lib/
>> gcc/mingw32/4.8.1/../../../
>> COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
>>  c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/collect2.exe -Bdynamic
>> c:/mingw/bin/.
>> ./lib/gcc/mingw32/4.8.1/../../../crt2.o
>> c:/mingw/bin/../lib/gcc/mingw32/4.8.1/cr
>> tbegin.o -Lc:/mingw/bin/../lib/gcc/mingw32/4.8.1
>> -Lc:/mingw/bin/../lib/gcc -Lc:/
>> mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib
>> -Lc:/mingw/bin/../lib
>> /gcc/mingw32/4.8.1/../../.. --verbose d:\Temp\ccABlV1b.o -lmingw32 -lgcc
>> -lgcc_e
>> h -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32
>> -lmingw
>> 32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt
>> c:/mingw/bin/../lib/gcc/mingw32/
>> 4.8.1/crtend.o
>> collect2.exe: error: ld returned 1 exit status
> 
> This is the same as without -Wl,--verbose switch.  If you posted the
> correct output, I'd say you don't have ld.exe on your PATH.  What does
> the following command print?
> 
>   ld --version
>

____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Eli Zaretskii | 8 Nov 18:32 2014
Picon

Re: error in compiling/linking a C program

[Why private email?]

> Date: Sat, 8 Nov 2014 07:49:52 -0800
> From: Ricardo Viegas <viegas@...>
> 
> Hi Eli!
> Here comes output 2.
> Thanks for your patience and interest!
> Regards, Ricardo
> -------------------------------------------
> 
> C:\Users\Ricardo>LINGC
> 
> D:\Programas\C>gcc -v -Wl,--verbose teste1.c
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
> Target: mingw32
> Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=m
> ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto
> --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++
> ,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-l
> ibstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gm
> p-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --
> with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-
> libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/
> mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
> Thread model: win32
> gcc version 4.8.1 (GCC)
> COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
>  c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/cc1.exe -quiet -v -iprefix c:\mingw\b
> in\../lib/gcc/mingw32/4.8.1/ teste1.c -quiet -dumpbase teste1.c -mtune=generic -
> march=pentiumpro -auxbase teste1 -version -o d:\Temp\cc64nzje.s
> GNU C (GCC) version 4.8.1 (mingw32)
>         compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2,
> MPC version 1.0.1
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/inclu
> de"
> ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/../..
> /../../include"
> ignoring nonexistent directory "/mingw/include"
> ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/inclu
> de-fixed"
> ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/../..
> /../../mingw32/include"
> ignoring nonexistent directory "/mingw/include"
> #include "..." search starts here:
> #include <...> search starts here:
>  c:\mingw\bin\../lib/gcc/mingw32/4.8.1/include
>  c:\mingw\bin\../lib/gcc/mingw32/4.8.1/../../../../include
>  c:\mingw\bin\../lib/gcc/mingw32/4.8.1/include-fixed
>  c:\mingw\bin\../lib/gcc/mingw32/4.8.1/../../../../mingw32/include
> End of search list.
> GNU C (GCC) version 4.8.1 (mingw32)
>         compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version 3.1.2,
> MPC version 1.0.1
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> Compiler executable checksum: 767202a405449496e68a54c4eee91a28
> COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
>  c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/as.exe -v -o d:\T
> emp\ccABlV1b.o d:\Temp\cc64nzje.s
> GNU assembler version 2.24 (mingw32) using BFD version (GNU Binutils) 2.24
> COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/;c:/mingw/bin/../libexec
> /gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/
> LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.8.1/;c:/mingw/bin/../lib/gcc/;c:/
> mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib/;c:/mingw/bin/../lib/
> gcc/mingw32/4.8.1/../../../
> COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
>  c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/collect2.exe -Bdynamic c:/mingw/bin/.
> ./lib/gcc/mingw32/4.8.1/../../../crt2.o c:/mingw/bin/../lib/gcc/mingw32/4.8.1/cr
> tbegin.o -Lc:/mingw/bin/../lib/gcc/mingw32/4.8.1 -Lc:/mingw/bin/../lib/gcc -Lc:/
> mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib -Lc:/mingw/bin/../lib
> /gcc/mingw32/4.8.1/../../.. --verbose d:\Temp\ccABlV1b.o -lmingw32 -lgcc -lgcc_e
> h -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw
> 32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/
> 4.8.1/crtend.o
> collect2.exe: error: ld returned 1 exit status

This is the same as without -Wl,--verbose switch.  If you posted the
correct output, I'd say you don't have ld.exe on your PATH.  What does
the following command print?

  ld --version

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Travis Spencer | 7 Nov 23:55 2014

Passing stderr to MinGW-compiled DLL?

Hi All,

I have ported some C code from *NIX to Windows. I am using MinGW to compile this port into a DLL. It all compiles and links without warning. I can run it and it works perfectly...or almost.

In some cases where I consume this DLL from an app written in Visual Studio 2013, I get this error:

Unhandled exception at 0x77E78E19 (ntdll.dll) in ConsoleApplication2.exe: 0xC0000005: Access violation writing location 0x00000014.

This exception is generated when I call this line of code in ConsoleApplication2.exe:

my_good_library_init(stderr, TRACE);

This function expects a FILE* and an enum indicating the log level the library should use. If no debugging should be done, the client can pass NULL instead of an open FILE. When I call it this way, there is no exception, and things work perfectly. Also, if I open a file (e.g., "C:\temp\log.txt") and pass that FILE* to the init function, it works as well.

Reading this thread[1], I thought it was because I was using the dynamically linked C run-time in the EXE and the statically linked run-time in my MinGW-compiled DLL because I am passing these flags to gcc when I link it:

-static-libgcc -static-libstdc++

I removed those two linker options, and add libgcc_s_dw2-1.dll to ConsoleApplication2.exe's PATH. The program ran still, but I continued to get the unhandled exception whenever passing stderr or stdout.

Can anyone help me figure out how I can pass stderr or stdout from my non-MinGW-compiled EXE to the MinGW-compiled DLL?

TIA!

--
------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Gmane