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

Author Topic: Help with installation?  (Read 15281 times)

0 Members and 1 Guest are viewing this topic.

Damian227

  • Newbie
  • *
  • Posts: 19
    • View Profile
Help with installation?
« on: July 30, 2010, 04:31:34 pm »
I'm probably missing something, but just not sure what.

I'm using Visual C++ 2010 Express and attempting to install SFML. I've followed the tutorial to install it.

1. I dragged the SFML folder (within the include folder) into my VC/include folder. - Is that right, or do I drag the CONTENTS of this folder into the VC/include?

2. I then dragged the contents of the SFML lib folder into the VC/lib folder.

3. I clicked on my project > properties > linker > input  and typed in sfml-system.lib into the additional dependencies, complete with the little ; that the others have seperating them.

4. I have no where to click on debug to add the debug version.. unless it goes in the same place?

5.
Quote
Your program should now compile, link and run fine. If you linked against the dynamic versions of the SFML libraries, donc forget to copy the corresponding DLLs (sfml-system.dll in this case) to your executable's directory, or to a directory contained in the PATH environment variable.


I don't get where I put this... I have millions of folders...

5. I then clicked C++ > Preprocessor  and added SFML_DYNAMIC to that too.

However when I try and run the sample program I get this;

1>------ Build started: Project: SFML 2, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'sfml-system.libkernel32.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Can anybody help me out? I seem to understand how the API works but can't do anything as I can't get it installed :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Help with installation?
« Reply #1 on: July 30, 2010, 04:35:06 pm »
Quote
I don't get where I put this... I have millions of folders...

The one where your executable is, as the tutorial says.

Quote
cannot open file 'sfml-system.libkernel32.lib'

You forgot to put a separator (space or ';') in your linker settings between these two libraries.

And remember that if you get runtime errors, you'll have to recompile SFML with VC 2010.
Laurent Gomila - SFML developer

Damian227

  • Newbie
  • *
  • Posts: 19
    • View Profile
Help with installation?
« Reply #2 on: July 30, 2010, 04:37:36 pm »
Quote from: "Laurent"

Quote
cannot open file 'sfml-system.libkernel32.lib'

You forgot to put a separator (space or ';') in your linker settings between these two libraries.

And remember that if you get runtime errors, you'll have to recompile SFML with VC 2010.


I have to add sfml-system.libkernel32.lib to the additional dependencies too? It only said sfml-system.lib? Do I have to add the debug one and nay more here?


Quote from: "Laurent"

Quote
Quote:
I don't get where I put this... I have millions of folders...


The one where your executable is, as the tutorial says.


Of the project or the Visual C++ 2010 program itself?... I was told to drag the contents of the lib folder into my Windows/system32 folder by another guide?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Help with installation?
« Reply #3 on: July 30, 2010, 04:42:24 pm »
Quote
I have to add sfml-system.libkernel32.lib to the additional dependencies too? It only said sfml-system.lib?

No... You already had kernel32.lib in your linker settings, and when you added sfml-system.lib, you forgot to put a space or ';' to separate them. So the linker thinks that "sfml-system.libkernel32.lib" is a single library name.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Help with installation?
« Reply #4 on: July 30, 2010, 04:43:49 pm »
Quote
Of the project or the Visual C++ 2010 program itself?

Your executable, the one generated by compiling your project.

Quote
I was told to drag the contents of the lib folder into my Windows/system32 folder by another guide?

This is really bad. If you want to make the SFML DLLs globally available, rather add their directory to the PATH environment variable.
Laurent Gomila - SFML developer

Damian227

  • Newbie
  • *
  • Posts: 19
    • View Profile
Help with installation?
« Reply #5 on: July 30, 2010, 04:49:41 pm »
Ok I'm now getting this message;

1>------ Build started: Project: SFML 2, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'sfml-system.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I'm guessing this is because sfml-system.dll is yet to be put with the executable?

Quote from: "Laurent"

Your executable, the one generated by compiling your project.


Still having trouble... I've put the .dll in my Project file and tried it in all the sub folders within... still having the error. I can't seem to find a .exe only a ton of project related files that just open up within Visual 2010?

I'm sorry if I sound thick, but this is very new to me :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Help with installation?
« Reply #6 on: July 30, 2010, 04:53:21 pm »
Quote
I'm guessing this is because sfml-system.dll is yet to be put with the executable?

No, the DLL is needed later at runtime (when you launch your application), not for compiling nor linking.
This error happens because the linker can't find sfml-system.lib. Which shouldn't happen if you did step 2 correctly. Try the other way described in the tutorial (set the path to the SFML libraries in your project settings).

Quote
Still having trouble... I've put the .dll in my Project file and tried it in all the sub folders within... still having the error. I can't seem to find a .exe only a ton of project related files that just open up within Visual 2010?

You won't get a .exe until your project succeeds to compile and link ;)

Quote
I'm sorry if I sound thick, but this is very new to me

Why don't you read some nice tutorial about how to add and use libraries with Visual C++? This way you'd understand what you do, instead of blindly following the installation steps of SFML.
Laurent Gomila - SFML developer

Damian227

  • Newbie
  • *
  • Posts: 19
    • View Profile
Help with installation?
« Reply #7 on: July 30, 2010, 04:58:17 pm »
Quote
Quote
I'm guessing this is because sfml-system.dll is yet to be put with the executable?

No, the DLL is needed later at runtime (when you launch your application), not for compiling nor linking.
This error happens because the linker can't find sfml-system.lib. Which shouldn't happen if you did step 2 correctly. Try the other way described in the tutorial (set the path to the SFML libraries in your project settings).


Tried this originally and got this message...

C:\Documents and Settings\Damian\My Documents\Visual Studio 2010\Projects\SFML 1\SFML 1\SFML 1.vcxproj : error  : The expression """.6" cannot be evaluated. Method 'System.String.6' not found.  C:\Documents and Settings\Damian\My Documents\Visual Studio 2010\Projects\SFML 1\SFML 1\SFML 1.vcxproj

Now the main.cpp won't even load, neither will any option settings. That project is essentially dead.

Am I write in thinking I just highlight all the files within the SFML/lib folder and drag them into the VC/lib folder... thats what I got from reading it and thats what I did? So they're all loose together?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Help with installation?
« Reply #8 on: July 30, 2010, 05:03:54 pm »
Quote
Tried this originally and got this message...

C:\Documents and Settings\Damian\My Documents\Visual Studio 2010\Projects\SFML 1\SFML 1\SFML 1.vcxproj : error : The expression """.6" cannot be evaluated. Method 'System.String.6' not found. C:\Documents and Settings\Damian\My Documents\Visual Studio 2010\Projects\SFML 1\SFML 1\SFML 1.vcxproj

What exactly did you do??
Laurent Gomila - SFML developer

Damian227

  • Newbie
  • *
  • Posts: 19
    • View Profile
Help with installation?
« Reply #9 on: July 30, 2010, 05:09:30 pm »
I went to the section to add the lnclude, which looks like this

Quote
$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;


and added $(SFML-1.6)\include; to the end... it then went crazy when I clicked apply... did I do something wrong?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Help with installation?
« Reply #10 on: July 30, 2010, 05:18:57 pm »
For "$(SFML-1.6)" to be understood by Visual Studio, "SFML-1.6" must be an environment variable. If it's not, put the real absolute path of SFML instead.

And this is for includes, you have to do the same thing for libraries, as explained in the tutorial.
Laurent Gomila - SFML developer

Damian227

  • Newbie
  • *
  • Posts: 19
    • View Profile
Help with installation?
« Reply #11 on: July 30, 2010, 05:23:35 pm »
Ok I tried $(C:\SFML-1.6\include); and the same for the lib in that directory... I get this following message;

An error has occurred while saving the edited properites listed below:
   Include Directories
   Library Directories
One or more values are invalid. MSBuild returned the following error: The expression "C:\SFML-1.6\include" cannot be evaluted.

Thats the full path, so I'm still confused as to why it won't work?

Damian227

  • Newbie
  • *
  • Posts: 19
    • View Profile
Help with installation?
« Reply #12 on: July 30, 2010, 05:34:36 pm »
Ok I've managed to get the Lib Directory to allow me to write;

C:\SFML-1.6\lib\;

and apply it with no issues... once I removed the $ and () around it... however I still get the

1>------ Build started: Project: SFML 2, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'sfml-system.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

message?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Help with installation?
« Reply #13 on: July 30, 2010, 06:26:15 pm »
Where did you write "C:\SFML-1.6\lib\"? Does the sfml-system.lib file exist in that folder?
Laurent Gomila - SFML developer

Damian227

  • Newbie
  • *
  • Posts: 19
    • View Profile
Help with installation?
« Reply #14 on: July 30, 2010, 06:29:54 pm »
Quote from: "Laurent"
Where did you write "C:\SFML-1.6\lib\"? Does the sfml-system.lib file exist in that folder?


I wrote it in the Library Directories space the tutorial says to write it. Inside the SFML-1.6\lib\ folder is exactly what came with the SDK I downloaded here... every file. I see the sfml-system.dll and a ton of .a extentions?