x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[Closed] log error

hi community , so i build my project in vs , and i got this error wich i have no idea what it can posibly mean

 1>papCharacter.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl AWeapon::OnEquip(void)" (?OnEquip@AWeapon@@QEAAXXZ) referenced in function "public: void __cdecl ApapCharacter::EquiWeapon(class AWeapon *)" (?EquiWeapon@ApapCharacter@@QEAAXPEAVAWeapon@@@Z)
 1>C:\Users\Rui\Documents\Unreal Projects\pap\Binaries\Win64\UE4Editor-pap.dll : fatal error LNK1120: 1 unresolved externals

Any ideas thank you

Product Version: Not Selected
Tags:
more ▼

asked Mar 06 '15 at 02:40 PM in C++ Programming

avatar image

Folgad0
14 7 10 14

avatar image Steve Robb STAFF Mar 06 '15 at 04:35 PM

Hi,

Without seeing your code and setup, it's hard to say. At a guess, I'd say either your module dependencies are set up wrongly, or your AWeapon class does not have a MODULENAME_API macro on it to export the symbols:

https://docs.unrealengine.com/latest/INT/Programming/Modules/API/index.html

Steve

avatar image Folgad0 Mar 06 '15 at 11:08 PM

ive searched a lot on google for the error error LNK2019 , but it seems to be an error for a lot of difrent stuff .

I rly cant find any solution here is the part of the code i think its refering from the log

 void ApapCharacter::EquipWeapon(AWeapon *Weapon)
 {
     if (CurrentWeapon != NULL)
     {
         CurrentWeapon = Inventory[CurrentWeapon->WeaponConfig.Priority];
         CurrentWeapon->OnUnEquip();
         CurrentWeapon = Weapon;
         Weapon->SetOwningPawn(this);
         Weapon->OnEquip();
     }
     else
     {
         CurrentWeapon = Weapon;
         CurrentWeapon = Inventory[CurrentWeapon->WeaponConfig.Priority];
         CurrentWeapon->SetOwningPawn(this);
         Weapon->OnEquip();
     }
 }


Thank you for the reply so far

avatar image Steve Robb STAFF Mar 10 '15 at 08:28 PM

It's the AWeapon class definition that needs investigating. I think you have something like:

 UCLASS()
 class AWeapon : public AActor

... but you need something like:

 UCLASS()
 class WEAPONMODULE_API AWeapon : public AActor

... but I can't really help without posting your AWeapon class definition. The contents of your .cpp files are unlikely to be relevant to this problem.

Steve

avatar image Steve Robb STAFF Apr 07 '15 at 01:57 PM

There's been no further response to this thread in a month, so I'm closing it for tracking purposes. Please open a new thread if you are still having problems.

Steve

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Apr 07 '15 at 01:58 PM by Steve Robb for the following reason:

Problem is not reproducible or outdated


0 answers: sort voted first

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question