MARSHALL Keith | 1 Jul 2004 09:59
Favicon

Re: setting library path

Aaron W. LaFramboise wrote:
> The easy way to fix this is to just add it to your path:
> export PATH=c:/my/new/path/to/dll:%PATH
> I think the path will need to be a valid win32 path, not just a MSYS
> path which win32 doesn't understand.

If you are using the MSYS sh.exe, then that should be

   export PATH="/c/my/new/path/to/dll:$PATH"

sh.exe will convert this to the correct win32 format, in the
environment passed to the user process.

If, however, you are starting your process from cmd.exe, or
command.com, then the correct syntax is

   PATH=c:\my\new\path\to\dll;%PATH%

Best regards,
Keith.

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
MinGW-users mailing list
MinGW-users@...

(Continue reading)

Earnie Boyd | 1 Jul 2004 11:59

[mini-FAQ/reminder]

Introduction
============
You receive this message because you are subscribed to the MinGW
mailing list. This is a reminder/mini-FAQ sent once a month. If 
you want to unsubscribe from the mingw-users mail list you can do 
so at http://lists.sourceforge.net/mailman/listinfo/mingw-users.  
Have your password handy (if you can't find it, you'll be offered 
an option to have it mailed to you).

What is MinGW?
==============
MinGW stands for "Minimalist GNU for Windows" and is a development
package (as well as target) which allows you to compile software 
for "native" Windows 32-bit platforms.  Please visit our website 
http://www.mingw.org for more information.

Who authored MinGW? How is it maintained? What is its licensing?
================================================================
MinGW was created by Colin Peters and was placed by him into the 
public domain.  There is no centralized force behind MinGW - it is 
maintained by volunteers and its development directed by the user 
community.  MinGW uses free GNU C/C++ compiler, its core libraries
and headers (Win32 import libraries and header definitions) are in 
public domain and it uses the vendor-supplied runtime library, so
in short, you can use it to develop royalty-free software, either
open- or close-sourced.  For more comprehensive licensing terms,
please visit http://www.mingw.org/licensing.shtml

Can MinGW be used to compile GNU or OpenSource software?
========================================================
(Continue reading)

SourceForge.net | 1 Jul 2004 15:05
Picon
Favicon

[mingw - C/C++] Why undefined reference?


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

I try to compile the following code, but during linking I get an "undefined
reference to A::a" error. Does anyone know why?

using namespace std;
class A{
	static int a;
public:
	
	static void seta(int i);
};

void A::seta(int i){
	A::a=i;
}

int main(){
	A::seta(3);
}

Thanx
Nick

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
(Continue reading)

SourceForge.net | 1 Jul 2004 15:16
Picon
Favicon

[mingw - C/C++] RE: curious about a warning


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

Ah, it's a macro. well, I guess that explains it.

The macros I am using are always uppercase, so I can differ between a macro
and a function.

______________________________________________________________________
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=286529

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

John Gaughan | 1 Jul 2004 15:45
Gravatar

Re: [mingw - C/C++] Why undefined reference?

SourceForge.net said:
> By: nioannou
>
> I try to compile the following code, but during linking I get an
> "undefined
> reference to A::a" error. Does anyone know why?

Try initializing your static variable. For example, put this outside your
class declaration:

int A::a = 0;

I do not remember why this is the way it is, but this change fixes it. I
do not have my copy of the standard available where I am at or I would
explain it better.

--

-- 
John Gaughan
john@...
http://www.johngaughan.net/

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
MinGW-users mailing list
MinGW-users@...

(Continue reading)

John Gaughan | 1 Jul 2004 15:52
Gravatar

Re: [mingw - C/C++] RE: curious about a warning

SourceForge.net said:
> By: kidkat
>
> The macros I am using are always uppercase, so I can differ between a
> macro
> and a function.

That is good programming practice. However, some of the code out there
(Win32 API, C++ STL, etc) are older than some of the programming practices
that became more popular recently. Java is partly to blame (in a good way)
for that. Anyway, there is a lot of older code out there written in a way
inconsistent with the way many of us write new code. The assertion macro
is one example. There are many others, such as the Win32 API calls that
are macros but look like functions, but the macros turn into functions
anway (e.g. Unicode stub functions, anything like
Function()/FunctionEx()).

The moral of the story? Look carefully and grep headers to figure out what
is really going on.

--

-- 
John Gaughan
john@...
http://www.johngaughan.net/

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
(Continue reading)

Greg Chicares | 1 Jul 2004 16:49
Picon

Re: Creating DLL

Cristiano wrote:

> gcc now has on option -shared.

Yes, MinGW has supported '-shared' for several years.
Always use it for creating DLLs. Whether to declare
functions as import or export is a separate issue.

> If I use it I don't need to declare my functions with:
> extern __declspec(dllexport)
> 
> right?

You should be able to omit that and just use the automatic
import options: search for things like
   --enable-auto-import
   --enable-runtime-pseudo-reloc
That way is convenient and simple once you get it working.
But it may be less robust than using __declspec attributes,
for instance if you export data or function pointers--this
may have been improved, but it definitely caused problems
in the past.

Personally, I prefer to use __declspec: although it seems
laborious, it is more robust and works with more compilers
other than gcc.

> I only need to declare my function as export and gcc -shared do the rest?

'export' is a C++ keyword that means something else. If
(Continue reading)

SourceForge.net | 1 Jul 2004 17:02
Picon
Favicon

[mingw - C/C++] RE: Why undefined reference?


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

> "undefined reference to A::a"

You need to define A::a.

> class A{
> 	static int a;

This is only a declaration. Add a definition at
global scope, as below.

> public:
> 	static void seta(int i);
> };

Add a definition here, like [untested]
  static int A::a;
so that A::a is defined when used below.

> void A::seta(int i){
> 	A::a=i;
> }

This would be explained in detail in a C++ faq such
as Marshall Cline's.

(Continue reading)

Andy Sy | 1 Jul 2004 22:08
Favicon

adding new default include paths

I'd like to add new default include directories to MinGW
since don't want to keep adding a -I prefix each time I
invoke gcc.

Is fiddling with the spec file the way to do this?  How
does one go about it?

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

Anand, Vaidyanathan R | 1 Jul 2004 22:23
Picon
Favicon

RE: adding new default include paths

The preferred way to do this would be to add your new include
directories to
the environment variables CPATH (which is searched regardless of
language) or 
C_INCLUDE_PATH/CPLUS_INCLUDE_PATH (which are language specific).

Regards,
Anand

-----Original Message-----
From: Andy Sy [mailto:andy@...] 
Sent: Thursday, July 01, 2004 1:08 PM
To: mingw-users@...
Subject: [Mingw-users] adding new default include paths

I'd like to add new default include directories to MinGW
since don't want to keep adding a -I prefix each time I
invoke gcc.

Is fiddling with the spec file the way to do this?  How
does one go about it?

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend
Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
MinGW-users mailing list
MinGW-users@...
(Continue reading)


Gmane