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

Author Topic: Trying to write a program where you move a square...  (Read 3396 times)

0 Members and 1 Guest are viewing this topic.

Gio

  • Newbie
  • *
  • Posts: 16
    • View Profile
Trying to write a program where you move a square...
« on: June 03, 2010, 12:40:56 am »
I am trying to write a simple program where you move a square around the screen. However, i got the following error when I tried to build it:
Code: [Select]
1>------ Build started: Project: Move the Square!!!, Configuration: Debug Win32 ------
1>  Move the Square!!!.cpp
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Move the Square!!!.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Red" (?Red@Color@sf@@2V12@B)
1>C:\Users\Gio\Desktop\Documents\C++ Programs\2D & 3D Games\Move the Square!!!\Debug\Move the Square!!!.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

How can i fix this? I will give the code if needed.
~~Gio~~

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Trying to write a program where you move a square...
« Reply #1 on: June 03, 2010, 02:18:56 am »
I have no clue about MSVS but are you using the correct version of MSVS that your SFML library has been compiled for? Just a wild guess.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Trying to write a program where you move a square...
« Reply #2 on: June 03, 2010, 08:19:22 am »
Read the "Getting started - Visual C++" tutorial, and stop when you see "SFML_DYNAMIC" ;)
Laurent Gomila - SFML developer

Gio

  • Newbie
  • *
  • Posts: 16
    • View Profile
Trying to write a program where you move a square...
« Reply #3 on: June 03, 2010, 11:19:24 pm »
Well, I got it to compile now  :) . But now, it crashes when I try to run it. I put the .dll's in the folder (system, graphics and window) and it  still crashed. So I replaced the linking with the -d versions of the .dll's and also replaced the .dll's. It now won't even start. How do I fix this? :oops:
~~Gio~~

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Trying to write a program where you move a square...
« Reply #4 on: June 03, 2010, 11:33:14 pm »
Do you have an error message after the crash? Have you tried using the debugger?
Laurent Gomila - SFML developer

Gio

  • Newbie
  • *
  • Posts: 16
    • View Profile
Trying to write a program where you move a square...
« Reply #5 on: June 04, 2010, 01:25:46 am »
It gives an error when I run w/ debugging:
Quote
This Application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application event log.

Where is the event log?
~~Gio~~

Gio

  • Newbie
  • *
  • Posts: 16
    • View Profile
Trying to write a program where you move a square...
« Reply #6 on: June 10, 2010, 11:01:46 pm »
Anyone? I still can't fix it. :oops:
~~Gio~~

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Trying to write a program where you move a square...
« Reply #7 on: June 11, 2010, 04:17:31 am »
If you got it to compile and you put the dlls in the folder with the exe you should be able to double click the exe and run it. If not it's something with the code/driver.

I would start with the basic tests/tuts before writing code. That can also help you find which dll you are missing by what you include or not and whether it compiles/crashes when you run the exe.

This will also help you figure out whether it's the IDE setup or something else.

I can't really give you better advice because I don't use VS.

 

anything