Re: newbie - can't get include and libs to work (Keith Marshall)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: newbie - can't get include and libs to work (Keith Marshall)

Ross Berteig
All in all, I'd call suggest pragmatic avoidance of spaces. They
do improve the readability of long, descriptive file names in an
all-GUI desktop, but they are not nearly as friendly to use at
the command prompt. At least CMD.EXE does file name completion,
and also adds the quotes on the assumption that the command will
be parsed following the minimal rules described by Roman earlier
in this thread.

The various *nix flavors all allowed spaces in file names (I
think that nearly any characters except slash and NUL were
allowed in file names, and I know for certain that '*', '?' and
most of the rest of the characters that were magic to the shell
were also allowed), but no sane user of a shell prompt would dare
do that because it always caused hassles. Shells that supported
name completion were rare in those days too.

These days on Windows, I let anything with a proper installer
have its way with "C:\Program Files". I figure that if it came with
an installer, then it knows what to expect. But I never manually
install anything in that folder.

For everything else, I keep folders named C:\Programs, and
C:\Programs\Bin inside it. Trivial useful command line tools get
copied to C:\Programs\Bin, which is also in the system PATH.
Larger packages without installers get their own folders in
C:\Programs, and occasionally parts of them get added to PATH as
well. MinGW is a good example of that category.

I'm reasonably careful to keep my project development folders
inside paths that lack spaces as well, and rarely put spaces in
any name that is known to a tool chain.

For things like Lua for Windows which got installed in C:\Program
Files but also provides include and lib folders for development
use, I'm simply careful in my Makefiles to get things quoted
right the first time. The system supplied  PROGRAMFILES
environment variable is handy for keeping things portable, as
long as you are careful with when and where the quotes finally
get put on the name.

All that said, I don't think it would have ever occurred to me to
try to make a library available by editing the GCC config files.
I would normally use the usual approach to getting -I and -L
options into the GCC command line in the project's Makefile.
Otherwise, you've concealed the project's dependency on a
third-party library and made it much more difficult for someone
else to work with the source code.

Ross Berteig                               [hidden email]
Cheshire Engineering Corp.           http://www.CheshireEng.com/


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie - can't get include and libs to work (Keith Marshall)

David Eaton
Forgive me, but I'm not familiar with editing a make file.  I know they are used in Unix/Linux, but all the compiling I did there I didn't edit one.  I am very much a newbie so any guidance would be greatly appreciate!

Thanks!
Dave


--- On Fri, 10/24/08, Ross Berteig <[hidden email]> wrote:

> From: Ross Berteig <[hidden email]>
> Subject: Re: [Mingw-users] newbie - can't get include and libs to work (Keith Marshall)
> To: [hidden email]
> Date: Friday, October 24, 2008, 9:17 PM
> All in all, I'd call suggest pragmatic avoidance of
> spaces. They
> do improve the readability of long, descriptive file names
> in an
> all-GUI desktop, but they are not nearly as friendly to use
> at
> the command prompt. At least CMD.EXE does file name
> completion,
> and also adds the quotes on the assumption that the command
> will
> be parsed following the minimal rules described by Roman
> earlier
> in this thread.
>
> The various *nix flavors all allowed spaces in file names
> (I
> think that nearly any characters except slash and NUL were
> allowed in file names, and I know for certain that
> '*', '?' and
> most of the rest of the characters that were magic to the
> shell
> were also allowed), but no sane user of a shell prompt
> would dare
> do that because it always caused hassles. Shells that
> supported
> name completion were rare in those days too.
>
> These days on Windows, I let anything with a proper
> installer
> have its way with "C:\Program Files". I
> figure that if it came with
> an installer, then it knows what to expect. But I never
> manually
> install anything in that folder.
>
> For everything else, I keep folders named C:\Programs,
> and
> C:\Programs\Bin inside it. Trivial useful command
> line tools get
> copied to C:\Programs\Bin, which is also in the
> system PATH.
> Larger packages without installers get their own folders in
> C:\Programs, and occasionally parts of them get added
> to PATH as
> well. MinGW is a good example of that category.
>
> I'm reasonably careful to keep my project development
> folders
> inside paths that lack spaces as well, and rarely put
> spaces in
> any name that is known to a tool chain.
>
> For things like Lua for Windows which got installed in
> C:\Program
> Files but also provides include and lib folders for
> development
> use, I'm simply careful in my Makefiles to get things
> quoted
> right the first time. The system supplied  PROGRAMFILES
> environment variable is handy for keeping things portable,
> as
> long as you are careful with when and where the quotes
> finally
> get put on the name.
>
> All that said, I don't think it would have ever
> occurred to me to
> try to make a library available by editing the GCC config
> files.
> I would normally use the usual approach to getting -I and
> -L
> options into the GCC command line in the project's
> Makefile.
> Otherwise, you've concealed the project's
> dependency on a
> third-party library and made it much more difficult for
> someone
> else to work with the source code.
>
> Ross Berteig                              
> [hidden email]
> Cheshire Engineering Corp.          
> http://www.CheshireEng.com/
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> MinGW-users mailing list
> [hidden email]
>
> You may change your MinGW Account Options or unsubscribe
> at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users


     

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: newbie - can't get include and libs to work (Keith Marshall)

Tuomo Latto
David Eaton wrote:
> Forgive me, but I'm not familiar with editing a make file.  I know they are used in Unix/Linux, but all the compiling I did there I didn't edit one.  I am very much a newbie so any guidance would be greatly appreciate!

http://www.google.com/search?q=makefile+tutorial


--
Tuomo

... Remember that you are unique.  Just like everyone else.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
MinGW-users mailing list
[hidden email]

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