Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Spirro

Pages: 1 ... 3 4 [5]
61
General / Re: Setting Up With CMAKE tutorial Help
« on: June 21, 2012, 04:36:40 am »
I don't understand how I am supposed to set a path variable.. I installed C-Make and I downloaded the SFML 2.0 files and put them in respective folders. But I don't know what I am doing wrong. Whenever I open the visual studio command prompt and type cmake I get nothing just an unknown command error. Any ideas or help?

Under Windows 7 click start, right click computer then select properties.  At the upper left of the window that appears you will see an option called "Advanced System Settings".  Click that and a new window comes up.  At the lower right click "Environment Variables".  Yet another window comes up with a scrollable window at the bottom.  Scroll till you find "Path".  Select "Path" then click edit.  A text entry box comes up.  Now, at the end of the list, enter the path to your installed version of CMake, preceded by a semi colon.  Click Ok then try the tutorial again and everything should work fine.

62
General / Re: Will a SFML program run on "ALL" PCs?
« on: June 07, 2012, 12:40:11 am »
Unfortunately the info I posted was from the local help files I downloaded after installation of VS 2010 on my system.  I changed my settings to view help online and briefly tried to find the page in online format, but couldn't find it so I printed the local help text to file and copy/pasted relevant portions below.

Quote
There are three ways to redistribute Visual C++ DLLs:

1)  We recommend that you use the Visual C++ Redistributable Package ( VCRedist_x86.exe, VCRedist_x64.exe, VCRedist_ia64.exe) to install all Visual C++ libraries as shared DLLs in %windir% \system32. Visual Studio installs this package in the %WindowsSdkDir%\Bootstrapper\Packages folder. You can also download it from the Microsoft Download Center. For an example of how to use this package, see Walkthrough: Deploying a Visual C++ Application By Using the Visual C++ Redistributable Package. 

2)  Use Visual C++ Redistributable Merge Modules to install a particular Visual C++ library as shared DLLs in %windir%\system32. Access to this folder requires that the installer application be run by a user with administrative rights. For more information please see Redistributing By Using Merge Modules. An example of this deployment may be found in Walkthrough: Deploying a Visual C++ Application By Using a Setup Project. 

3)  Install a particular Visual C++ DLL in the same folder as the application by using files provide in the Program Files\Microsoft Visual Studio 10.0\VC\Redist directory. This way is recommended to enable installation of applications by users who do not have administrative rights or when it should be possible to run an application from a share.

Below that in my help text is this:

Quote
It is not recommended to redistribute C/C++ applications that statically link to Visual C++ libraries. It is often mistakenly assumed that by statically linking your program to Visual C++ libraries it is possible to significantly improve the performance of an application. However the impact on performance of dynamically loading Visual C++ libraries is insignificant in almost all cases. Furthermore, static linking does not allow for servicing the application and its dependent libraries by either the application's author or Microsoft. For example, consider an application that is statically linked to a particular library, running on a client computer with a new version of this library. The application still uses code from the previous version of this library, and does not benefit from library improvements, such as security enhancements. Authors of C/C++ applications are strongly advised to think through the servicing scenario before deciding to statically link to dependent libraries, and use dynamic linking whenever possible.

There is a link provided in the first quote for the 'Walkthrough' that didn't get copied, but again I use local help so the 'Walkthrough' link goes to another page in my local help file.

When I went to the download center and entered a search for 'VCRedist_x86.exe' I was given two links to follow for 2008.  Both links were to rather large files(100 meg+), so I did a google for 'VCRedist_x86.exe' and got a link to Microsoft to that file directly and it was <5meg.  I assume it would be what you are looking for.

63
General / Re: Will a SFML program run on "ALL" PCs?
« on: June 06, 2012, 11:02:43 pm »
I also looking into static linking of the VS 2010 runtimes for redistribution.  I use the Professional version so I have help files installed.  A quick search took me to a page that describing how static linking of these libraries if very frowned upon and didn't give an example of how to get it done.  However it did mention a simple work around to use so your VS 2010 compiled programs will run on computers without the VS 2010 compiler package installed.

The file you need depends on how your program is compiled.  You need either VCRedist_x86.exe, VC_Redist_x64.exe, or VCRedist_ia64.exe.  One of these will need to be downloaded on the target computer and installed, or included in your install package and executed on the target computer.

For static linking of the SFML libraries check http://www.sfml-dev.org/tutorials/2.0/start-vc.php .

64

No no, CMake is for compiling SFML, and I said you don't need it. I was talking about the "SFML and Visual Studio" tutorial, and specifically this paragraph:
Quote
If you chose to create a "Windows application" project, then the entry point of your code has to be the "WinMain" function instead of "main". Since it's Windows specific, and your code would therefore not compile on Linux or Mac OS X, SFML provides a way to keep a standard "main" entry point in this case: link your project to the sfml-main module ("sfml-main-d.lib" in Debug, "sfml-main.lib" in Release), the same way you linked sfml-graphics, sfml-window and sfml-system.

Another fault on my part.  I added sfml-main.lib to linker/input/additional dependencies as my first listing for release and sfml-main-d.lib as my first listing for debug.  This does compile correctly without having to change my entry point to 'main'.

Thank you very much Laurent.

65
General / Re: Trouble building SFML 2.0 snapshot with VS 2010 Pro
« on: June 06, 2012, 08:48:01 am »

Have you tried solutions from googling this error ID?

Here are some potential solutions:

1. Please change the "subsystem" in your linker settings from "Windows" to "Console".
2. In the Output category of the Link tab in the Project Settings dialog box, set the Entry Point Symbol to wWinMainCRTStartup.

Ok.  I spent some time testing your solution options.  I changed my subsystem to console.  This allowed me to compile both debug and release versions of the test file, but openned a console window.  That's something I didn't want to do.

I then changed the entry point with both subsystem settings to no effect.  The test file wouldn't compile.

When trying to figure out this problem I did all my searches here on the forum before posting.  After trying your answers I did then hit google and after a while found a very old post that mentioned setting the entry point to 'main'.  I made a new project and set up everything as per the vs 2010 tutorial page to be sure I had everything correct.  Then I set the entry point to 'main' and I got the test program compiled properly and it ran without a console window so thank you very much for the entry point suggestion.

First, SFML 2.0 RC is available for VS 2010 in precompiled form on the download page. You don't need to compile it.

Second, the "Getting started" tutorial says everything that you need to know, and has the solution to your problem. Just read it carefully, follow the steps, and everything will be ok.

You're right here on the first point.  As I mentioned above I was looking on youtube for graphics examples of libraries so when it came down to me compiling the source for SFML I did NOT scroll down any further to see that the libraries had actually already been compiled for everyone.  That's what I get for just watching a video.

For your second point I must just be missing something.  I assume you are talking about the cmake tutorial under getting started.  I've gone through that step several times to no avail.

I did download the compiled libraries and got them to compile the test program successfully, however I did still need to change my entry point to 'main'.

Thank you both.  Issue solved.

66
General / Trouble building SFML 2.0 snapshot with VS 2010 Pro(Fixed)
« on: June 06, 2012, 05:16:09 am »
Hello.  I am having trouble building the SFML 2.0 snapshot located on the download page.  I am trying to build it because I use Visual Studios 2010 Proffessional and there isn't already a package available for it.  I had been doing some research into graphics libs on youtube hoping to find something I liked and settled on trying SFML.  I found 2 videos there for building SFML with VS 2010 Express and gave them a try.

The first video, , uses cmake-gui to create a solution file that can be loaded into VS 2010.  Once made, you load the solution and create release/debug libraries then the author shows how to set up properties so that a project can compile using the new libraries.  After doing this I came across a problem in the linking phase of compilation(To be explained after I go over my attempts to resolve my issues).

The second video, http://www.youtube.com/watch?annotation_id=annotation_175195&src_vid=cDNo4bzrFW8&v=PtSDrLpV74M&feature=iv, uses cmake and nmake to create the libraries.  Again, after completing the steps in the video and trying a sample program I had problems.

Next I looked over the SFML site and found the tutorial on building SFML there(http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php) and followed it.  Then I went to the page(http://www.sfml-dev.org/tutorials/2.0/start-vc.php) detailing how to set up VS 2010 so that it can find the libraries and compile with them.  I again had problems after compilation and during the linking phase.  On the VS 2010 setup page a mention is made of using SFML_STATIC in the C/C++ preprossor when using static library builds.  I tried compilation with and without that setting while using the correct nomenclature of '-s' and '-s-d' on static builds and whatnot.

I have gone through many attempts at compilation of the sample program listed on the VS 2010 setup page using various settings for the project with no luck.  At best what it boils down to for me is this error:

MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

So, out of frustration I downloaded Code::Blocks and used my own install of MinGW from their website so that I was sure to have the most current version of the MinGW compiler system.  I went back to the page detailing how to create the libraries using CMake, made a make file for MinGW-make, and built the libraries.  I followed the instructions on this page(http://www.sfml-dev.org/tutorials/2.0/start-cb.php) to set up Code::Blocks and then compiles the example program at the bottom of the page.  It worked.  I had to copy the DLL files to my EXE file directory, but that was expected(and I didn't know how to go about making the static libs).

As you can see, I've tried many options to get SFML to compile under VS 2010 correctly, but I just can't get it to work.  I hear good things about Code::Blocks, but I'd rather use VS 2010(I bought the damn thing after all).  Any help would be appreciated.  If needed I can go through my setup processes again and get exact errors on the builds and post them here for further information.

**Sorry for the video link.  I've never made a post to a board that did things this way and I'm not sure why the second link didn't also create a video in this post.

EDIT - Forgot to mention I also tried compiling the current SVN files by converting the VS 2008 solution to VS 2010.  Again that failed me.

Pages: 1 ... 3 4 [5]