SFML community forums

General => General discussions => Topic started by: Metaby on October 08, 2008, 04:33:04 pm

Title: DotNet
Post by: Metaby on October 08, 2008, 04:33:04 pm
Hi, i learn C# in the school, but, i have programmed sfml with C++
I heared about, to use sfml at C#, i downloaded the svn version, and now, i have the folder "Dotnet" at the svn folders, i know, this is the .NET version of sfml, but where i should copy them at?

sry for my bad english
Title: DotNet
Post by: SirJulio on October 08, 2008, 05:07:18 pm
Hi,

short version :

- Compile SFML (C++) static release
- Compile CSFML (C wrapper) dll release
- last, compile SFML.Net (.Net wrapper) release

after that you will find sfml-net[].dll assemblies in your dotnet/lib folder, these are the references you need to add to your project.

Don't forget to copy CSFML dll next to your exe.
Title: DotNet
Post by: Metaby on October 08, 2008, 05:45:19 pm
ah.. ok..^^
sry, i dont understand :(
can you write me the "long version"? :)
Title: DotNet
Post by: SirJulio on October 08, 2008, 06:34:14 pm
Hm,

do you know how to compile SFML library ? If no, just follow instructions in the last chapter of the tutorial (Codeblocks (http://www.sfml-dev.org/tutorials/1.4/start-cb.php) or visual (http://www.sfml-dev.org/tutorials/1.4/start-vc.php) depending on your ide). You need to compile SFML as static library and in release.

After that, open the CSFML solution (build/VS or CB) and build as release DLL. Now you have your CSFML library somewhere in the CSFML/lib folder.

finally, build the SFML.Net library (always in release cfg), and you can add the resulting assembly (sfml-net dlls) to your project.

SFML.Net is not a stand-alone library : SFML (and CSFML) is required, that's why you need to build all these libs. =)
Title: DotNet
Post by: Metaby on October 08, 2008, 07:48:54 pm
ok thanks, i've done this.. but at the last step
"finally, build the SFML.Net library (always in release cfg), and you can add the resulting assembly (sfml-net dlls) to your project."
i get an error, that tells me, "The Namespace 'Tao' cannot be found"
what now? >.<

edit: i cannot decide between debug, release or anything else.. >.<
Title: DotNet
Post by: SirJulio on October 08, 2008, 08:11:54 pm
Yes, you need to download Tao framework (google ) for opengl binding to build the sample. but even if samples doesn't compile, you have your sfml-net library compiled.

For configuration in C# express (if you don't have the combobox), see that (http://cookingprogrammers.blogspot.com/2008/05/show-build-configuration-in-visual-c.html).
Title: DotNet
Post by: Metaby on October 08, 2008, 08:40:55 pm
so.. thanks.. i hope this is my last question >.<
and thanks a lot for what you've done for me^^
if i compile (release)
i get this error message (i try to translate it to english >.<)
"A project with the outputtype "Classlibrary" cannot be started directly.
To Debug the Project, add a startable project to this projectfolder, who refers to the library projects. Add the startable project as Start project."
Title: DotNet
Post by: SirJulio on October 08, 2008, 08:54:09 pm
Because you don't generate but start the project (I guess you pressed F5, no ? =p).

Right click your solution in the solution explorer and "Regenerate all" (i'm not sure for the name, i use a french version =) )
Title: DotNet
Post by: Metaby on October 08, 2008, 08:56:36 pm
ahhh thanks a lot ^^
nice, thanks :D
you helped me a lot, now i have my sfmlnet dlls =)
thanks :D