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. 

Error setting up and compiling a new c++ class

Hi there, I keep trying different ways to set up visual studio 17 and Unreal Engine 4.18. It's just not working. I have all the c++ game dev tools and the c++ win dev tools including the Win 10 and 8 SDKs.

Here's my error

 Candidate modules for hot reload:
   Test3
 Launching UnrealBuildTool... [C:/Program Files/Epic Games/UE_4.18/Engine/Binaries/DotNET/UnrealBuildTool.exe Test3 -Module Test3 Win64 Development -editorrecompile -canskiplink "C:/Users/FLO/Documents/Unreal Projects/Test3/Test3.uproject" ]
 Performing full C++ include scan (hot reloading a new target)
 Creating makefile for hot reloading Test3 (no existing makefile)
 Compiling game modules for hot reload
 Parsing headers for Test3Editor
   Running UnrealHeaderTool "C:\Users\FLO\Documents\Unreal Projects\Test3\Test3.uproject" "C:\Users\FLO\Documents\Unreal Projects\Test3\Intermediate\Build\Win64\Test3Editor\Development\Test3Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
 Reflection code generated for Test3Editor in 5.5413131 seconds
 Performing 9 actions (4 in parallel)
 [2/9] Resource ModuleVersionResource.rc.inl
 [3/9] Resource PCLaunch.rc
 SharedPCH.Engine.cpp
 Test3.cpp
 MovingParts.cpp
 MovingParts.gen.cpp
 Test3.init.gen.cpp
 [8/9] Link UE4Editor-Test3.dll
 [9/9] Link UE4Editor-Test3.lib
 LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib'
    Creating library C:\Users\FLO\Documents\Unreal Projects\Test3\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test3.lib and object C:\Users\FLO\Documents\Unreal Projects\Test3\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test3.exp
 ERROR: UBT ERROR: Failed to produce item: C:\Users\FLO\Documents\Unreal Projects\Test3\Binaries\Win64\UE4Editor-Test3.dll
 Total build time: 42.73 seconds (Local executor: 0.00 seconds)
 CompilerResultsLog: New page: Compilation - 2 Feb 2018 15:46:18
 CompilerResultsLog: Performing full C++ include scan (hot reloading a new target)
 CompilerResultsLog: Creating makefile for hot reloading Test3 (no existing makefile)
 CompilerResultsLog: Compiling game modules for hot reload
 CompilerResultsLog: Parsing headers for Test3Editor
 CompilerResultsLog:   Running UnrealHeaderTool "C:\Users\FLO\Documents\Unreal Projects\Test3\Test3.uproject" "C:\Users\FLO\Documents\Unreal Projects\Test3\Intermediate\Build\Win64\Test3Editor\Development\Test3Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
 CompilerResultsLog: Reflection code generated for Test3Editor in 5.5413131 seconds
 CompilerResultsLog: Performing 9 actions (4 in parallel)
 CompilerResultsLog: [2/9] Resource ModuleVersionResource.rc.inl
 CompilerResultsLog: [3/9] Resource PCLaunch.rc
 CompilerResultsLog: SharedPCH.Engine.cpp
 CompilerResultsLog: Test3.cpp
 CompilerResultsLog: MovingParts.cpp
 CompilerResultsLog: MovingParts.gen.cpp
 CompilerResultsLog: Test3.init.gen.cpp
 CompilerResultsLog: [8/9] Link UE4Editor-Test3.dll
 CompilerResultsLog: [9/9] Link UE4Editor-Test3.lib
 CompilerResultsLog: Error: LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib'
 CompilerResultsLog:    Creating library C:\Users\FLO\Documents\Unreal Projects\Test3\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test3.lib and object C:\Users\FLO\Documents\Unreal Projects\Test3\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test3.exp
 CompilerResultsLog: ERROR: UBT ERROR: Failed to produce item: C:\Users\FLO\Documents\Unreal Projects\Test3\Binaries\Win64\UE4Editor-Test3.dll
 CompilerResultsLog: Total build time: 42.73 seconds (Local executor: 0.00 seconds)
 LogMainFrame: MainFrame: Module compiling took 42.877 seconds
 LogSlate: Took 0.004017 seconds to synchronously load lazily loaded font '../../../Engine/Content/Editor/Slate/Fonts/DroidSansMono.ttf' (77K)

Please let me know how to solve this if you can!! Thanks

Product Version: UE 4.18
Tags:
more ▼

asked Feb 05 '18 at 02:12 PM in C++ Programming

avatar image

Libby07
6 1 1

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

1 answer: sort voted first

Your error is really this:

 LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib'

From the Microsoft website:

This error occurs because the linker cannot find the file name or the file path that is specified in the project properties. However, the file path that is mentioned in the project properties is correct because the linker does not handle the space character in the file path.

Solution: To resolve this error, use the path without space characters, or use quotation marks around the path in project properties.

(Source: https://support.microsoft.com/en-us/help/815645/you-receive-a-fatal-error-lnk1181-error-message-when-you-build-a-manag)

It appears that you have spaces in your file path path. Try deleting the space in "Unreal Projects"

more ▼

answered Feb 06 '18 at 12:20 AM

avatar image

Aericks
120 6 8 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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