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

Author Topic: need help with an error message  (Read 3819 times)

0 Members and 1 Guest are viewing this topic.

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
need help with an error message
« on: May 25, 2011, 07:47:22 pm »
Hi, im not an experienced C++ dev, I have been studying to program using sfml and i get the following error.

Quote
1>C:\Users\TOSHIBA\Documents\Visual Studio 2008\SFML-1.6\lib\sfml-network.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2B8

AdventWolf

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
need help with an error message
« Reply #1 on: May 25, 2011, 07:59:28 pm »
When you want to use a dll, you need to link the .lib file.

There should be sfml-network.dll and sfml-network.lib.
Link to sfml-network.lib.

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
need help with an error message
« Reply #2 on: May 25, 2011, 09:35:50 pm »
Quote from: "AdventWolf"
When you want to use a dll, you need to link the .lib file.

There should be sfml-network.dll and sfml-network.lib.
Link to sfml-network.lib.


Thanks a lot! thats solved the problem. But once again, i get some other error messages.

Quote
1>------ Build started: Project: testNetwork, Configuration: Debug Win32 ------
1>Linking...
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>C:\Users\TOSHIBA\Documents\Visual Studio 2008\Projects\MY_PROJECTS\testNetwork\Debug\testNetwork.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Users\TOSHIBA\Documents\Visual Studio 2008\Projects\MY_PROJECTS\testNetwork\testNetwork\Debug\BuildLog.htm"
1>testNetwork - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

AdventWolf

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
need help with an error message
« Reply #3 on: May 25, 2011, 09:43:57 pm »
Can you post a code sample?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
need help with an error message
« Reply #4 on: May 25, 2011, 09:51:20 pm »
You must link to sfml-main.
Laurent Gomila - SFML developer

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
need help with an error message
« Reply #5 on: May 25, 2011, 10:04:49 pm »
Quote from: "Laurent"
You must link to sfml-main.


Thanks, I got it working. But again another problem, I do not see the console window. but the compilation and everything seems to be going on. sorry to bother you again and again.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
need help with an error message
« Reply #6 on: May 25, 2011, 10:06:53 pm »
You don't see the console because you created a GUI application (which is the reason why you need a WinMain entry point instead of a main).

You must change your project to be a console application.
Laurent Gomila - SFML developer

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
need help with an error message
« Reply #7 on: May 25, 2011, 10:14:48 pm »
Quote from: "Laurent"
You don't see the console because you created a GUI application (which is the reason why you need a WinMain entry point instead of a main).

You must change your project to be a console application.


Thanks! everything is working now! thanks again