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"

Cannot compile new 4.7 project from code

I just downloaded 4.7. I create a new blank project from code. The files generate but there is a LINK error during the compiling.

Error 1 error LNK1181: cannot open input file 'ws2_32.lib' D:\TestGame\Intermediate\ProjectFiles\LINK TestGame

I am on Windows 8.1 x64 - VS2013 Professional. This is an modified blank project.

Product Version: Not Selected
Tags:
more ▼

asked Feb 26 '15 at 03:37 AM in Installation & Setup

avatar image

Demonicated
336 33 36 206

avatar image Doug E ♦♦ STAFF Feb 27 '15 at 07:58 PM

Hey Demonicated-

To help me investigate the problem you're having there are a couple questions I'd like to ask. Are you using 4.7 from the launcher or are you using a source code build from GitHub? Does the same error appear when creating a new unmodified project? Do you get the same error if you update to 4.7.1?

Cheers

Doug Wilson

avatar image Demonicated Feb 28 '15 at 08:39 PM

I just upgraded to 4.7.1 and am still having the same issue when creating a new project from code.

I open the engine from the Epic games launcher -> click new project -> click the C++ tab -> click Basic Code project. It copies the files, begins compiling and I get the message Project Conversion Failed. The project failed to compile with this version of the engine. Would you like to open the project in Visual Studio?

Here is the build log:

The project failed to compile with this version of the engine. Build output is as follows:

Running C:/Program Files/Epic Games/4.7/Engine/Binaries/DotNET/UnrealBuildTool.exe Test Development Win64 -project="D:/Documents/GitHub/Test/Test.uproject" -rocket -editorrecompile -progress Parsing headers for TestEditor Reflection code generated for TestEditor Performing 7 actions (4 in parallel) [3/7] Resource Test.rc [2/7] Resource ModuleVersionResource.rc.inl PCH.Test.Test.h.cpp Test.generated.cpp Test.cpp TestGameMode.cpp [7/7] Link UE4Editor-Test.dll LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib' -------- End Detailed Actions Stats ----------------------------------------------------------- ERROR: UBT ERROR: Failed to produce item: D:\Documents\GitHub\Test\Binaries\Win64\UE4Editor-Test.dll Cumulative action seconds (4 processors): 0.00 building projects, 23.34 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.11 linking, 0.00 other UBT execution time: 33.96 seconds

avatar image Demonicated Feb 28 '15 at 08:41 PM

Blueprint projects work fine, but I want to create a code project

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

4 answers: sort voted first

Hey guys-

Now that 4.7.3 has been released I encourage everyone to update their engine version and attempt to create a C++ project again. If anyone is still having problems creating projects please let us know what operating system you are using, if you are using the binary version or source code version of the engine, and any other information that may be useful such as error messages.

Cheers

Doug Wilson

more ▼

answered Mar 17 '15 at 07:31 PM

avatar image OpenGLDev May 31 '17 at 08:24 PM

Hi, I am having problem. I am on 4.16.0 Unreal Engine

avatar image 143258 Jul 07 '17 at 12:18 PM

Hi, I am having promlems to and it would be realy nice if you could help me : )

Here is my Question

I solved the problem somehow.

avatar image Doug E ♦♦ STAFF Jul 07 '17 at 03:11 PM

Hello 143258-

Please create a new post for the issue you're having and provide as much detail about the problem itself and your setup to help reproduce and investigate the problem.

Cheers

Doug Wilson

avatar image 143258 Jul 07 '17 at 05:08 PM

I solved the problem somehow.

OK here I asked the question a few day ago.

It still doesn't work. I also tried to install the Windows SDK and even but it didn't work, I installed the .NET Framework 4.7 too.

Newest: I'm trying to repair VS.

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

I found a workaround that solved the problem for my case:

The needed lib is located at: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib (at least in my case) I copied it to: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib and afterwards I could create a C++ Project without any further errors.

I could imagine that either my Visual Studio directory is lacking some libs, although I used the "Repair" functionality several times so it should be complete, or the compiler is just searching the lib in the wrong directory and somehow expects it in VS instead of at the Windows SDK folder.

more ▼

answered Mar 06 '15 at 04:07 PM

avatar image

nukeru
6 1 2

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

I had this problem today. Windows 8.1, 64-bit

I got it fixed by going to programs and features in Windows. (where you uninstall stuff) Click on MS Visual Studio 2013 Click REPAIR and when the options show up as to where to REPAIR from, choose the internet.. even if you have a disc or an image. It doesn't ask for a key or anything.

Let it go. took about 20 mins for me. Then it all worked fine.

Hope it helps you.

more ▼

answered Mar 14 '15 at 11:07 PM

avatar image

thankstipscom
644 38 37 70

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

Hey Demonicated-

The problem may be that your %Temp% folder his too many files in it as pointed out here: https://answers.unrealengine.com/questions/179723/47-unrealbuildtool-failed-to-generate-project-file.html#comment-180050

I would try searching for the folder on your computer and clear out any older temporary files that are no longer needed. Let me know if you still have any problems after that.

Cheers

Doug Wilson

more ▼

answered Mar 03 '15 at 02:20 PM

avatar image nukeru Mar 05 '15 at 04:42 PM

Hi Doug,

I have got exac5tly the same problem as Demonicated had. Therefore I tried if clearing the Temp folder would solve the problem, but i still keep getting this error:

The project failed to compile with this version of the engine. Build output is as follows:

Running D:/Program Files/Epic Games/4.7/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject3 Development Win64 -project="D:/Sammlung/Unreal Projects/MyProject3/MyProject3.uproject" -rocket -editorrecompile -progress Parsing headers for MyProject3Editor Reflection code generated for MyProject3Editor Performing 7 actions (4 in parallel) [2/7] Resource ModuleVersionResource.rc.inl [3/7] Resource MyProject3.rc PCH.MyProject3.MyProject3.h.cpp MyProject3.cpp MyProject3.generated.cpp MyProject3GameMode.cpp [7/7] Link UE4Editor-MyProject3.dll LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib' -------- End Detailed Actions Stats ----------------------------------------------------------- ERROR: UBT ERROR: Failed to produce item: D:\Sammlung\Unreal Projects\MyProject3\Binaries\Win64\UE4Editor-MyProject3.dll Cumulative action seconds (4 processors): 0,00 building projects, 27,79 compiling, 0,00 creating app bundles, 0,00 generating debug info, 0,10 linking, 0,00 other UBT execution time: 37,34 seconds

Any other suggestions what may solve it?

Thanks in advance, Jan

avatar image Demonicated Mar 05 '15 at 04:53 PM

Yeah still didnt work for me either. Some things to note: I recently uninstalled Visual Studio 2015. Also my engine was on the C drive while my project was on D.

I have tried reinstalling everything from scratch and am still getting this issue.

What I dont understand is how to find this being linked. This is a sockets library and is 32 bit im assuming. Is there a 64 bit lib file that should be referenced instead? or where could I manually add this file to fix the linking issue? A common folder somewhere?

avatar image nukeru Mar 05 '15 at 08:04 PM

I'm having Visual Studio on C, but my Engine as well as the Project are located on D. I also recently uninstalled Visual Studio 2015, our situations seem to be quite similar...

avatar image Doug E ♦♦ STAFF Mar 06 '15 at 12:07 AM

Hey Demonicated and nukeru-

I have submitted a report about the inability to create a code project (UE-11387) for further investigation. In the meantime can you attempt a couple other things for me? First, if you create a blueprint project are you able to, in the editor, go to File->Add Code to Project? Additionally, can you check if you have the Windows SDK installed? You can get the SDK here (http://www.microsoft.com/en-us/download/details.aspx?id=8279) if you don't have it or are unsure if you do or not.

EDIT: Another solution to check would be to follow mikepurvis's answer here (https://answers.unrealengine.com/questions/16743/cant-create-c-projects-or-open-ones-from-beta.html) to see if VS120COMNTOOLS is set properly

Thanks

Doug Wilson

avatar image nukeru Mar 06 '15 at 12:30 PM

I've tried adding code manually as you described and i got the same error as before. I have Windows SDK installed and my VS120COMNTOOLS variable is set to the right path. Unlike Demonicated (Windows 8.1) I'm on Windows 7 by the way, so this doesn't seem to play a role.

(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