• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
TheComet

Standard library directories on Windows?

9 posts in this topic

This is more or less a rant, (and somewhat of an inquiry).

 

Linux and Mac users: We all have standard locations where shared and static libraries can be found and linked against. /usr/lib, or /usr/local/lib. We also all have standard locations where header files can be found: /usr/include, or /usr/local/include. We also have a standard about naming conventions for libraries, e.g. every dynamic or static library must begin with "lib" followed by your library name in order to avoid name clashes, because they're all dumped into the same directory, and there's a standard about placing header files in a sub-directory in the respective system "include" directory named after your library name (although not everyone abides to this either for some reason).

 

Now I ask you, what on earth is Windows doing? Is there even a standard? Because it doesn't seem so.

 

Everyone is creating custom environment variables such as "SFML_HOME" or "BOOST_ROOT" or "GMOCK_PATH". Do you even know how cumbersome this makes it to write cross platform build systems?

 

The more libraries you add, the larger your PATH environment variable gets (because it has to point to all kinds of command line tools because Windows doesn't have a "bin" directory), and the more you have to account for in build scripts.

 

Then you have those people (such as myself) who come from a *NIX OS and don't know any better than to create a folder on C:\ called "dev" under which the common directories "include", "lib", "bin", and "share" can be found.

 

What is the standard way of doing this on Windows? I've collaborated with a few Windows developers and they all seem to do something entirely different than the last.

 

 

0

Share this post


Link to post
Share on other sites
There is no standard way. Everyone has to find a solution that works for them.

What works will also depend on the kind and number of projects you are working on and how many different build settings you need to support. Edited by BitMaster
1

Share this post


Link to post
Share on other sites

If this is for maintaining a build solution cross platform, have you looked into using CMake?

While this may not answer your question about where's standard, but I thought your comment about there not being a good cross platform build solution warranted a comment.

 

You can write some cmake modules for Finding specific packages, some packages even include their own CMake Find modules.

0

Share this post


Link to post
Share on other sites

The problem on Windows would be incompatible files depending on which compiler and even compiler-version is in use, so the pseudo-standard way would be to put includes, libs and dlls in a subdirectory of the compiler. Then some dll files used to be put in windows/system32 by some people, although thats discouraged especially for anything not globally compatible.

Personally I add whats needed for developing a program to the path, and include+lib directories indirectly through whatever build system used to the compiler+linker command line. Other people copy the dll files near the exe always, and that would be needed for delivering files to other people also.

 

On Unix people may get the opposite problem when they want to use some other library version or replacement library or compiler, as the standard-directories are hardcoded in the buildsystem or even compiler.

0

Share this post


Link to post
Share on other sites

Personally, i just put all my library files in a custom directory inside my main programming folder somewhere, then i add it to the "additionnal include path" and "additionnal library parth" inside visual studio, that way, there's no conflict whatsoever.

1

Share this post


Link to post
Share on other sites

^^^ What he said.

 

zlet.png

Problem solved. (And yes, both Boost and SFML are in there)

 

Besides, you'll need different versions of libraries if they were compiled with different compilers, so it makes sense to keep libraries contained under separate folders depending on the compiler, compiler settings, and compiler version that you built them under.

0

Share this post


Link to post
Share on other sites
Agreed with Hodgman.

Never use environment variables if you can avoid it. Even worse than using global variables in a program. The only one you should ever think about modifying is the PATH variable, and only if you're a command line tool that needs to be run manually by users.


If you're organizing your project, add all dependent libs relative to your root project folder and check the entire damn thing in to source control. If your libraries are compiler-dependent, you're already doing it completely wrong.

If you're distributing an application, your DLLs go in the same folder as your EXE. The only time it's acceptable to install something to a system path is if you're Microsoft (.Net, DirectX). Edited by Nypyren
1

Share this post


Link to post
Share on other sites

Everyone knows that global variables are bad, and PATH is a system-wide global variable, so building a system that relies on changing PATH in a specific way is not just bad, it's evil.

Agreed.

Having a global environment for common libs and includes is quite nice for small "try out" projects. But every larger project I worked on during my career has a build environment that is as self-contained as possible.

Funny detail:

Last year my children and I played "ace of spades" a lot. But originally it did not run on my machine (needless to say that the support was completely useless). Finally I found that I had a newer Python version installed, and some environment variable that pointed to that installation. This broke some internal component of the game.

Edited by cdoubleplusgood
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0