Jump to content
  • Advertisement
Sign in to follow this  
ColmGrogan

fatal error LNK1120: 2 unresolved externals

This topic is 2568 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OK so i thought it was a linker problem but i think i have the right directorys all ready linked. here is the error.


1>Agent.obj : error LNK2019: unresolved external symbol "int __cdecl Random(struct Range)" (?Random@@YAHURange@@@Z) referenced in function "public: void __thiscall Agent::attack(class Player &)" (?attack@Agent@@QAEXAAVPlayer@@@Z)
1>Player.obj : error LNK2001: unresolved external symbol "int __cdecl Random(struct Range)" (?Random@@YAHURange@@@Z)
1>Agent.obj : error LNK2019: unresolved external symbol "int __cdecl Random(int,int)" (?Random@@YAHHH@Z) referenced in function "public: void __thiscall Agent::attack(class Player &)" (?attack@Agent@@QAEXAAVPlayer@@@Z)
1>Player.obj : error LNK2001: unresolved external symbol "int __cdecl Random(int,int)" (?Random@@YAHHH@Z)
1>C:\Users\PCUser\Documents\College Work\year 2\Games programming\repeatCa3\Debug\repeatCa3.exe : fatal error LNK1120: 2 unresolved externals

Share this post


Link to post
Share on other sites
Advertisement

OK so i thought it was a linker problem but i think i have the right directorys all ready linked. here is the error.


1>Agent.obj : error LNK2019: unresolved external symbol "int __cdecl Random(struct Range)" (?Random@@YAHURange@@@Z) referenced in function "public: void __thiscall Agent::attack(class Player &)" (?attack@Agent@@QAEXAAVPlayer@@@Z)
1>Player.obj : error LNK2001: unresolved external symbol "int __cdecl Random(struct Range)" (?Random@@YAHURange@@@Z)
1>Agent.obj : error LNK2019: unresolved external symbol "int __cdecl Random(int,int)" (?Random@@YAHHH@Z) referenced in function "public: void __thiscall Agent::attack(class Player &)" (?attack@Agent@@QAEXAAVPlayer@@@Z)
1>Player.obj : error LNK2001: unresolved external symbol "int __cdecl Random(int,int)" (?Random@@YAHHH@Z)
1>C:\Users\PCUser\Documents\College Work\year 2\Games programming\repeatCa3\Debug\repeatCa3.exe : fatal error LNK1120: 2 unresolved externals


A solid piece of advice: Don't doubt your linker. If it tells you there's something wrong then you can be pretty sure of the fact that you're the one making an error somewhere


I can't really say any more about your problem without knowing what it is you're trying to do exactly and how your project is set up

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!