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

Author Topic: LNK2001 Error for unknown reason  (Read 1704 times)

0 Members and 2 Guests are viewing this topic.

MyFriendTre

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
LNK2001 Error for unknown reason
« on: July 19, 2023, 09:44:56 am »
I've been up all night trying to figure out whats causing this linker error. Never used SFML and new to c++, I need to be able to set this up for an assignment. Any help is welcome, I've been working at it for hours at this point.

My program recognizes the files but wont "link" to them?

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: LNK2001 Error for unknown reason
« Reply #1 on: July 19, 2023, 11:15:47 am »
First, why are you posting a screenshot of you not linking the lib?
Looks nothing like the screenshot in the tutorial


It looks like you're compiling in x64 in your 2nd screenshot, but you show us your configuration for win32. Make sure you include the headers and link the lib for the x64 platform.

Follow the tutorial, pretty much.

MyFriendTre

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: LNK2001 Error for unknown reason
« Reply #2 on: July 19, 2023, 05:40:28 pm »
First, why are you posting a screenshot of you not linking the lib?
Looks nothing like the screenshot in the tutorial


It looks like you're compiling in x64 in your 2nd screenshot, but you show us your configuration for win32. Make sure you include the headers and link the lib for the x64 platform.

Follow the tutorial, pretty much.

When I do that I get LNK1181 error. I tried the tutorial way and I tried the way we did it in my course, my professor didnt need to include dependencies Regardless, Im still getting errors with dependencies and x64. 


G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: LNK2001 Error for unknown reason
« Reply #3 on: July 19, 2023, 06:28:45 pm »
Looks like you also skipped the step where you configure the directories, at least the lib one.


MyFriendTre

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: LNK2001 Error for unknown reason
« Reply #4 on: July 19, 2023, 07:25:44 pm »
Looks like you also skipped the step where you configure the directories, at least the lib one.



I fixed that but im still getting the same one error.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: LNK2001 Error for unknown reason
« Reply #5 on: July 20, 2023, 04:05:00 pm »
That's literally not the same error though.

In one screenshot your path is c/libraries/sfml2.6, in the other one it's c/sfml2.6, is that right? ???