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"

C++ Compile Error "Couldn't find target rules file for target"

Hi! For every 5 minutes spent on adding a feature, it always takes 10 hours to fix the errors, but today it's different. I made a new map and added the code to C++ ShooterMainMenu.cpp for it to show up in menus, but when I try to compile the code in UE4, I get this error (Image). Tied removing the code I added and I still get the same error. Can anybody help me? The project is a Shooter Game template. alt text

Product Version: UE 4.10
Tags:
screenshot_25.png (26.8 kB)
more ▼

asked Dec 31 '15 at 11:18 AM in C++ Programming

avatar image

iKiWY
6 2 7 9

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Try deleting your binaries and intermediate\build folders. Oh, and never compile in the editor.

more ▼

answered Dec 31 '15 at 12:58 PM

avatar image

TTaM
1.7k 79 28 81

avatar image iKiWY Dec 31 '15 at 04:51 PM

where do I compile in Visual Studio?

avatar image iKiWY Dec 31 '15 at 04:58 PM

deleted them both and now im getting an error when starting up that the project could not be compiled

avatar image Doug E ♦♦ STAFF Dec 31 '15 at 05:13 PM

Hey iKiWY-

Compiling in Visual Studio can be done by right-clicking on the name of the project in the solution solution explorer and selecting Build. When doing this, you want to ensure that your solution configuration and solution platform as set to Development Editor and Win64 respectively.

Cheers

Doug Wilson

avatar image iKiWY Dec 31 '15 at 05:29 PM

Can't see any Build option

avatar image iKiWY Dec 31 '15 at 05:34 PM

I'm opening the .cpp in windows explorer because it doesn't show up in UE content browser if that makes any difference

avatar image TTaM Dec 31 '15 at 05:45 PM

Do you have the project open in Visual Studio? Or are you right clicking in the editor/windows explorer?

avatar image iKiWY Dec 31 '15 at 06:35 PM

opening the file with Visual Studio via windows explorer

avatar image TTaM Dec 31 '15 at 06:38 PM

You're opening the solution file, not the .cpp file, yes?

avatar image iKiWY Dec 31 '15 at 06:40 PM

ehmmm.....

avatar image iKiWY Dec 31 '15 at 06:41 PM

where is the solution file?

avatar image TTaM Dec 31 '15 at 06:48 PM

If you don't have a .sln file (yourproject.sln) then right click the uproject and choose 'regenerate project files' or something. It has 'generate' in there somewhere.

avatar image iKiWY Dec 31 '15 at 07:11 PM

thank you got it :D After Building the solution I get this errors in ShooterMainMenu.cpp alt text

screenshot_26.png (11.3 kB)
avatar image TTaM Dec 31 '15 at 07:15 PM

Use the output window, not the errors window, to get build errors.

avatar image iKiWY Dec 31 '15 at 07:16 PM

1 succeeded, 1 failed

avatar image iKiWY Dec 31 '15 at 07:45 PM

But its the same

avatar image TTaM Dec 31 '15 at 07:46 PM

It will tell you why it failed, copy+paste the entire log.

avatar image iKiWY Jan 01 '16 at 09:30 PM
 1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
 2>------ Build started: Project: Gamma, Configuration: Development_Editor x64 ------
 2>  Performing full C++ include scan (hot reloading a new target)
 2>  Compiling game modules for hot reload
 2>  Performing 3 actions (4 in parallel)
 2>  [1/3] Link UE4Editor-ShooterGameLoadingScreen-9084.dll
 2>  Module.ShooterGame.cpp
 2>     Creating library C:\Users\KiWY\Documents\Unreal Projects\Gamma\Intermediate/Build/Win64\UE4Editor\Development\UE4Editor-ShooterGameLoadingScreen-9084.lib and object C:\Users\KiWY\Documents\Unreal Projects\Gamma\Intermediate/Build/Win64\UE4Editor\Development\UE4Editor-ShooterGameLoadingScreen-9084.exp
 2>C:\Users\KiWY\Documents\Unreal Projects\Gamma\Source\ShooterGame\Private\UI\ShooterHUD.cpp(53): error C2100: illegal indirection
 2>  -------- End Detailed Actions Stats -----------------------------------------------------------
 2>ERROR : UBT error : Failed to produce item: C:\Users\KiWY\Documents\Unreal Projects\Gamma\Binaries\Win64\UE4Editor-ShooterGame-2722.dll
 2>  Total build time: 284,73 seconds
 2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3073: The command ""C:\Program Files\Epic Games\4.10\Engine\Build\BatchFiles\Build.bat" ShooterGameEditor Win64 Development "C:\Users\KiWY\Documents\Unreal Projects\Gamma\Gamma.uproject" -rocket -waitmutex" exited with code -1.
 ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
avatar image TTaM Jan 01 '16 at 09:35 PM

2>C:\Users\KiWY\Documents\Unreal Projects\Gamma\Source\ShooterGame\Private\UI\ShooterHUD.cpp(53): error C2100: illegal indirection

Go fix.

avatar image iKiWY Jan 01 '16 at 10:11 PM

there were 2 ** on line 52...

avatar image iKiWY Jan 01 '16 at 10:52 PM

Thanks, works now :D But when I build the game (to the exe) it crashes on boot.

avatar image Roel Aug 19 '18 at 03:00 PM

I had this issue when creating projects on one of my computers. For some reason projects created on one of the computers create the following setting in the .uproject file (just open it with a text editor):

"Enterprise": true,

I removed the setting from the .uproject file and now it compiles.
(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

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

Answers to this question