I brought this up awhile ago, and twicker actually responded. He said there is now a source code section in the articles, and if that gets enough postings he'll open up the source code section of the site.
I'm in so long as the code is open source without restrictions. I suppose that would mean that the code is not GPL compatible, which is a very good thing in my opinion.
I'm in so long as the code is open source without restrictions. I suppose that would mean that the code is not GPL compatible, which is a very good thing in my opinion.
Expat MIT license?
I'll do some if you help me come up with ideas. Writing trivial programs with too many comments is kind of my speciality.
Write a program that flips all the bits in a file, demonstrating how to use stream iterators, std::transform() and lambda functions.
For simplicity, I suggest that the arguments be:
@ne555.
It's the dll-s.
sfml-graphics.dll = 5Mb alone.
A zip folder containing everything except the 5 dlls (all source code + exe + images ) weighs in at 137kb.
The program won't run without the dlls.
I'll look into github. Thanks.
EDIT: I published and included a zip file without the 5 dlls. The 137kb .zip file uploaded no problem.
I left a list of the names of the 5 missing files and instructed readers to download these themselves at sfml.org. This will have to do for now.
I also published the rummy card game. The computer plays well enough that you have to make an effort to beat it. If you play poorly it will kick your ass.
There's my contribution to the source code section for now.
Try linking statically to SFML. If you're using Code::Blocks, you'll have to either get the official MinGW or build SFML from source with Code::Blocks's (TDM) MinGW. If you choose the official MinGW way (easier IMO), you'll have to also statically link to libstdc++ and libgcc (IIRC).
There's my contribution to the source code section for now.
I just checked and they are both still awaiting approval.
@m4ster0shi. Thanks for the tips. I've been using Code::Blocks for some time now (v 4.4.1 w MinGW). I thought I knew how to manipulate the build options and set library paths correctly but I can't get it.
I'm getting link errors which were "undefined reference to..." and are now "multiple definitions of..."
Also, there are no static files (in the SFML/1.6/lib folder) named libstdc++ and libgcc, although there are .dll versions by these names.
I'll update the articles with the static versions when I get them built.
Meanwhile, I neglected to mention which version of SFML I'm using. It is 1.6
EDIT: I got it! I had everything right but I needed to perform a build from scratch (not just change the source file then build). I still need the 2 dlls above though (libstdc++ and libgcc). I'll look deeper into m4ster0shis hint re. statically linking to these as well.
EDIT2: I found several files in MinGW\lib\gcc\mingw32\4.5.2 named libgcc and libstdc++ (several extensions each).
for all builds (your project's name (instead of Debug or Release or some other build
you may have) should be selected in the tree widget to the left) should do the trick.
Meanwhile, I neglected to mention which version of SFML I'm using. It is 1.6
Same here.
I wonder how many copies of the same libraries you have distributed across the file system.
Haha, I do that too. Being able to tell what the dependencies of an
executable are by just looking at the bin directory is useful sometimes.
The result was a bit alarming. It builds fine but leaves the folder bin\Release empty. I stopped experimenting when that happened.
I wonder how many copies of the same libraries you have distributed across the file system.
Umm... 50? I think it's mainly limited to copies of the same dlls in every project folder.
I have a (full) statically linked version ready for checkers. Now I'll try it for the
card game. Thank you m4ster0shi for guiding me through those couple of steps where I hadn't tread before.
EDIT: Got it on the first try for the rummy program.
Maybe I'm missing something.. but I believe the source code section would be for source code. Not binaries produced by compiling and linking source code or libraries that source code needs to be linked against.
Maybe I'm missing something.. but I believe the source code section would be for source code. Not binaries produced by compiling and linking source code or libraries that source code needs to be linked against.
I am preparing a zip file for attachment which contains all source code and images used with an exe thrown in so that the reader could simply unzip and run the program if he just wanted to test it out.
The linkage issue arose when I tried uploading a zip with all 5 dlls needed by the exe in it. At 9Mb it wouldn't upload.
EDIT: Sorry about the threadjacking there Catfish, I should be done now.
Maybe I'm missing something.. but I believe the source code section would be for source code. Not binaries produced by compiling and linking source code or libraries that source code needs to be linked against.
What happens when new versions of the dependencies come out that break the code that's found on the source code section? I think it'd be a good idea to include dependencies instead of having the users hunt all over the internet trying to find version X.Y.Z (that they might not be able to). Any non-trivial project could potentially have dozens of dependencies, any one of which becomes incompatible, invalidates the entire project in respect to the 'new programmers' that will be using it. (and don't even get me started about the dependencies of the dependencies! It's a vicious cycle in a lot of open source projects...)
Example:
To use BoneCP (a java-based database pooling API), IIRC one needs "Apache Commons Logging" -- no version specified, but will break with the wrong version, then the commons logging needs the "Commons-Core" in addition to a specific logging back-end implementation.