Luke Dunstan | 1 Mar 2004 02:10
Picon
Favicon

Re: avifileopen() problem

 
MSDN says that the function is called AVIFileOpen(), and the headers declare this so the problem is with your code.
 
Luke
 
----- Original Message -----
Sent: Monday, March 01, 2004 1:03 AM
Subject: [Mingw-users] avifileopen() problem

Hi there:
 
I tried to call the windows api function AviFileOpen() in my c++ program. But it cannot go through the compile, the MingW compiler cannot find the declaration. I included the <vfw.h> file. What else header files shall I use?
 
Thank you!
 
shiming

Do you Yahoo!?
Get better spam protection with Yahoo! Mail
Luke Dunstan | 1 Mar 2004 03:28
Picon
Favicon

Re: "include scrubber"

 
You should check the GCC manual but I doubt that it has such a feature. Because a preprocessor is a lot different to Java import, it probably isn't really feasible in general to do this sort of checking, but I may be wrong.
 
Luke
 
----- Original Message -----
From: mike white
Sent: Monday, March 01, 2004 2:45 AM
Subject: [Mingw-users] "include scrubber"

Hi,

 

  Does g++ have a way to determine if include’s don’t need to be there? If not, does anyone know of a tool that can help me do this?

 

For example, say I have code that looks like this:

 

#include <iostream.h>

#include <math.h>

#include <vector>

#include <string>

 

int main ()

{

   cout << “hello world” << endl;

   return 0;

}

 

 

I wanted to use a tool that would tell me that math.h, vector, and string are included but don’t need to be. Something like how the eclipse java ide does with imports? Is there a way to turn on this as a warning in g++?

 

Aloha,

mike

coder_infidel | 1 Mar 2004 04:05
Picon
Favicon

Re: Standard libraries


I don't think -nostdlib could really made your program smaller because the
linker only includes the objects that are necessary. Is your program C or
C++ (I'm guessing C++)? How big is the executable after stripping? How small
does it need to be? It may not be possible to reduce the size. If you
_really_ want to use -nostdlib, first link normally with the "-v" flag to
GCC to see what objects and libraries are being linked. Also, crtdll is not
supported by MinGW so it is better if you don't use it.

Luke

----- Original Message ----- 
Wrom: XLYRWTQTIPWIGYOKSTTZRCLBDXRQB
To: "Konference "Mingw"" <mingw-users@...>
Sent: Monday, March 01, 2004 1:51 AM
Subject: [Mingw-users] Standard libraries

> One of my program is requested to be as small as possible in memory.
> So I have tried -nostdlib option but now I am stucked because linker is
still missing a lot of symbols. I have
> discovered I need to link with -lmingw32, -lgcc and -lstdc++.
> I have found that I need -lcrtdll or -lmsvcrt to be able to use atexit
function. But then some other symbols are missing
> and I am unable to find them ( libcrtdll_a_iname, _nm__atexit ).
>
> Can I get some list with what libraries do I need to enable certain
functions and functionalities?
>
> And how can I have this warning gone:
> warning: cannot find entry symbol _mainCRTStartup; defaulting to 00401000
>
>
> ---
> Jan Ringoš, Tringi@...
> http://Tringi.Mx-3.cz
> n.v.t. MX-3, www.mx-3.cz

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

coder_infidel | 1 Mar 2004 04:15
Picon
Favicon

Re: [ mingw-Bugs-786031 ] A proposed htmlhelp.h


----- Original Message ----- 
Wrom: ZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQ
To: <mingw-users@...>
Sent: Monday, March 01, 2004 12:34 AM
Subject: Re: [Mingw-users] [ mingw-Bugs-786031 ] A proposed htmlhelp.h

> Phil Krylov wrote:
>
> >Danny said that the patch should be rejected because we have no way to
> >resolve the symbols referenced in htmlhelp.h. That's not true;
> >although MS htmlhelp.lib is static, it imports HtmlHelpA/W from a dll
> >(named hhctrl.ocx). I attached a .def to create a "pure import lib"
> >libhtmlhelp.a; also, can't we link directly to hhctrl.ocx?
> >
> >
> >
> The point Danny was making is that this isn't really part of the
> runtime.  It is an add on that is easily obtainable.  If the API is C
> and not C++ then just put the header in /mingw/include and put the .lib
> version of the library in /mingw/lib.  Yes you can link directly to the
> dll, but since this doesn't end in .dll then binutils may have a problem
> recognizing it as one; I don't know that, I haven't reviewed the code to
> see how it determines a dll.
>
> Earnie.

IMHO the HTML Help API should be supported by w32api because it is an
important Windows feature (more so than RTF help) used by most applications.
I know that htmlhelp.lib is a static library so it is probably better if
w32api has an equivalent library, but a direct import library is the next
best thing. However, if linking directly with htmlhelp.lib works with MinGW
then that should be good enough, but I haven't tried it. Have you, Phil?

Luke

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

Young Alan | 1 Mar 2004 04:29
Picon
Favicon

How to declare a friend template for a class correctly?


_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

Phil Krylov | 1 Mar 2004 09:50
Picon

Re[2]: [ mingw-Bugs-786031 ] A proposed htmlhelp.h

Hello, coder.

Monday, March 1, 2004, 6:15:23 AM you wrote:

chc> IMHO the HTML Help API should be supported by w32api because it is an
chc> important Windows feature (more so than RTF help) used by most applications.
chc> I know that htmlhelp.lib is a static library so it is probably better if
chc> w32api has an equivalent library, but a direct import library is the next
chc> best thing. However, if linking directly with htmlhelp.lib works with MinGW
chc> then that should be good enough, but I haven't tried it. Have you, Phil?

Yes, I tried to link with an original htmlhelp.lib, but to no success,
so at first I had to use LoadLibrary/GetProcAddress, and now -
libhtmlhelp.a. 

chc> Luke

--

-- 
Respect,
 Phil                          mailto:phil@...

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

Phil Krylov | 1 Mar 2004 09:52
Picon

Re[2]: [ mingw-Bugs-786031 ] A proposed htmlhelp.h

Hello, coder.

Monday, March 1, 2004, 6:15:23 AM you wrote:

chc> IMHO the HTML Help API should be supported by w32api because it is an
chc> important Windows feature (more so than RTF help) used by most applications.
chc> I know that htmlhelp.lib is a static library so it is probably better if
chc> w32api has an equivalent library, but a direct import library is the next
chc> best thing. However, if linking directly with htmlhelp.lib works with MinGW
chc> then that should be good enough, but I haven't tried it. Have you, Phil?

Yes, I tried to link with an original htmlhelp.lib, but to no success,
so at first I had to use LoadLibrary/GetProcAddress, and now -
libhtmlhelp.a. 

chc> Luke

--

-- 
Respect,
 Phil                          mailto:phil@...

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

SourceForge.net | 1 Mar 2004 10:32
Picon
Favicon

[mingw - Windows API] Simple winsock program


Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=2449069
By: mnsanghvi

Hi!,

   I have the following piece of code that works
on Linux, but causes a crash in the printf() if I
am using gcc/win32api.

--- gethostinfo.c ---
#include <stdio.h>
#if defined(__WIN32__)
#  define __USE_W32_SOCKETS 
#  include <windows.h>
#else
#  include <netdb.h>
#endif /* __WIN32__ */

int main()
{
  struct hostent *host_ent;
  char *host_name_to_lookup;

  host_name_to_lookup = (char *) "www.google.com" ;

  host_ent = gethostbyname(host_name_to_lookup);

  printf("\nHostname:\t%s\n", host_ent->h_name);

  return (0);

}

----- end gethostinfo.c ------

I am linking with using '-lws2_32' option to gcc.

FYI, I am doing this under cygwin, but using the
-mno-cygwin option.  I have the MingW w32api
and runtime installed.

Any clues or suggestions ? 

thanks,

    mehul

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=286641

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

K.S.Chen | 1 Mar 2004 10:56
Picon

Re: [mingw - Windows API] Simple winsock program

it seems that you forget to initialize the winsock library. e.g. int main() { struct hostent *host_ent; char *host_name_to_lookup; host_name_to_lookup = (char *) "www.google.com" ; { WSADATA wsaData; if (WSAStartup(MAKEWORD(2, 0), &wsaData) != 0) { fprintf(stderr, "can't init winsock library\n"); return 0; } } host_ent = gethostbyname(host_name_to_lookup); printf("\nHostname:\t%s\n", host_ent->h_name); WSACleanup(); return (0); }

SourceForge.net wrote:
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=2449069 By: mnsanghvi Hi!, I have the following piece of code that works on Linux, but causes a crash in the printf() if I am using gcc/win32api. --- gethostinfo.c --- #include <stdio.h> #if defined(__WIN32__) # define __USE_W32_SOCKETS # include <windows.h> #else # include <netdb.h> #endif /* __WIN32__ */ int main() { struct hostent *host_ent; char *host_name_to_lookup; host_name_to_lookup = (char *) "www.google.com" ; host_ent = gethostbyname(host_name_to_lookup); printf("\nHostname:\t%s\n", host_ent->h_name); return (0); } ----- end gethostinfo.c ------ I am linking with using '-lws2_32' option to gcc. FYI, I am doing this under cygwin, but using the -mno-cygwin option. I have the MingW w32api and runtime installed. Any clues or suggestions ? thanks, mehul ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=286641 ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ 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

------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ MinGW-users mailing list MinGW-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users

Martin Wackenhut | 1 Mar 2004 11:42
Picon

Mingw and X-server

Hi,

I just searched the web and only found Cygwin/X. Does anyone know if this
is working with my mingw/msys installation or is it incompatible?
Or is there any X-server using mingw?

Thanks Martin
-- 
------------------------------------------------
Dipl. Phys. Martin Wackenhut MS
Universität Stuttgart
Institut für Computeranwendungen 1 (ICA 1)
Pfaffenwaldring 27
70569 Stuttgart

Tel:  +49 (0)711 685-7610
WWW  :  http://www.ica1.uni-stuttgart.de/~mawa
------------------------------------------------

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
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