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

Author Topic: Error  (Read 12431 times)

0 Members and 1 Guest are viewing this topic.

Jalfor

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Error
« on: June 18, 2011, 01:41:06 pm »
Code: [Select]
1>------ Build started: Project: SFML Test WORKING, Configuration: Debug Win32 ------
1>sfml-graphics-s-d.lib(Color.obj) : error LNK2005: "public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z) already defined in sfml-graphics-d.lib(sfml-graphics-d.dll)
1>D:\programming\C++ projects\SFML Test WORKING\Debug\SFML Test WORKING.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


That is the error I am getting when compiling a pre-written thing on shapes in the tutorial section. Thanks in advance.
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error
« Reply #1 on: June 18, 2011, 01:53:22 pm »
You're linking to both the static and dynamic versions of sfml-graphics. This makes no sense, link to only one version.
Laurent Gomila - SFML developer

Jalfor

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Error
« Reply #2 on: June 18, 2011, 02:09:58 pm »
Code: [Select]
1>------ Build started: Project: SFML Test WORKING, Configuration: Debug Win32 ------
1>Main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>Main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Yellow" (?Yellow@Color@sf@@2V12@B)
1>Main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Blue" (?Blue@Color@sf@@2V12@B)
1>Main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Red" (?Red@Color@sf@@2V12@B)
1>D:\programming\C++ projects\SFML Test WORKING\Debug\SFML Test WORKING.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Now this is the error I'm getting.
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error
« Reply #3 on: June 18, 2011, 02:41:11 pm »
You must define SFML_DYNAMIC.
Laurent Gomila - SFML developer

Jalfor

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Error
« Reply #4 on: June 18, 2011, 02:51:42 pm »
how do I do that?
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error
« Reply #5 on: June 18, 2011, 03:11:11 pm »
It's explained in the tutorial.
Laurent Gomila - SFML developer

Jalfor

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Error
« Reply #6 on: June 18, 2011, 03:37:34 pm »
Sorry for not realizing that even though it was in the tutorial. New error now.

Code: [Select]
'SFML Test WORKING.exe': Loaded 'D:\programming\C++ projects\SFML Test WORKING\Debug\SFML Test WORKING.exe', Symbols loaded.
'SFML Test WORKING.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'SFML Test WORKING.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'SFML Test WORKING.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'SFML Test WORKING.exe': Loaded 'D:\programming\C++ projects\SFML Test WORKING\SFML Test WORKING\sfml-graphics-d.dll', Cannot find or open the PDB file
The program '[4924] SFML Test WORKING.exe: Native' has exited with code -1072365566 (0xc0150002).
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error
« Reply #7 on: June 18, 2011, 03:49:17 pm »
Ok, now it's a runtime error (compiling and linking are ok), so you can run the debugger (F5) to know what's wrong ;)

By the way, in your next message you should give us more information about your system (OS, compiler, version of SFML, ...).
Laurent Gomila - SFML developer

Jalfor

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Error
« Reply #8 on: June 18, 2011, 04:03:28 pm »
I've been running the debugger all along, what I posted above is the output. also, it comes up with a popup window saying

The application was unable to start correctly (0xc0150002). Click OK to close the application.

Also, I won't be able to post a response for a few hours as I am going to sleep now.

As always, thanks for the help.
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error
« Reply #9 on: June 18, 2011, 04:10:48 pm »
This output is not from the debugger, this is the regular output.

The debugger:
- shows you where the crash happened in the source code
- shows you the call stack at the moment of the crash
- can show you much more information but these two things should be enough ;)
Laurent Gomila - SFML developer

Jalfor

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Error
« Reply #10 on: June 19, 2011, 05:02:06 am »


That should give you some more information on what I'm doing.
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error
« Reply #11 on: June 19, 2011, 10:12:22 am »
I see. This kind of error popup often means that a DLL couldn't be found. You must make sure that the SFML DLLs are located in your working directory (which is defined in your project settings -- should be the project directory by default, but I recommend changing it to the executable directory).
Laurent Gomila - SFML developer

Jalfor

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Error
« Reply #12 on: June 19, 2011, 12:30:15 pm »


It is probably easier for both you and me if I just show you things with YouTube videos as that is a lot easier than trying to explain it and you can see I'm not doing anything stupid.
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error
« Reply #13 on: June 19, 2011, 01:05:04 pm »
Did you first recompile SFML? (VC2008 libs are not compatible with VC2010 -- half of the forum topics are about this)
Laurent Gomila - SFML developer

Jalfor

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Error
« Reply #14 on: June 19, 2011, 01:32:29 pm »
oh, I thought that the converting thing fixed that. I'll do that now and get back to you with my result after I've done that.
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.