Problem: cannot build UE 4.7.2 project with VS

hello everyone .
I’ve been suffering for the last 5 days with this problem so please help me.
i can’t get vs to build the project after i add the “Pickup.h” and “Pickup.cpp” files it gives me the following →

the weird thing that it works for “MyCharacter.h” and “MyCharacter.cpp” files that is generated by VS,and somehow it doesn’t connect between “battery.h” and “battery.cpp”.
PS: battery is Pickup
help me please i need to start building my final year project for college ,Thanks.

Can you provide an entire copy/paste text from the output window please ?.
Also, is this an engine built from the source through github or is it the binary release from launcher ?

Usually I get a MSB3073 error when files are checked out in source control.


Also, im not sure if this matters but i’ve never used like

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = battery)
variable varName; 

I’ve only ever used it like this

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "battery")
variable varName;

You shouldn’t be using TSubObjectPtr anymore.

UProperty should be UPROPERTY

UFunction should be UFUINCTION

BlueprintNativeMachine doesn’t correspond to anything. Did you mean BlueprintNativeEvent?

If your class is named ABattery your files should be named Battery not battery.

Everything is CaSe SeNsItIvE.

Does your cpp file include your header?

Yes, don’t use TSubObjectPtr, just use a normal C++ pointer.

Also these should definitely be capitalized, as they are MACROS and C++ is also CaSeSeNsItIvE

wow Thank you very much for the reply @Allar & @SaxonRah.
after fixing my syntax with your instructions everything works and it builds successfully

PS: the build source binaries are downloaded through the launcher.

Great, glad to see it’s working :slight_smile: Good luck on your project <3