Announcement

Collapse
No announcement yet.

Problems with my first c++ codes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    My projects are saved in my disk D:...

    Had same issue , about the .h files couldnt open and everything .

    So , i closed the Editor , and left visual studio opened, Rebuild the project with no success, and then i "Debug'ed" and editor came up , i looked into my code and no erros anymore...

    Leave a comment:


  • replied
    Originally posted by CGZee View Post
    Here's what I did:

    1- Installed UE4 launcher from UE4 download page.
    2- From the launcher, downloaded and installed UE4
    3- I clicked on verify installation under Launch
    4- downloaded and compiled the github source code version
    both versions are installed in d: drive.
    You can learn a lot by browsing the source code but the only reason I see to build UE4 from source is if you're going to modify the engine. If you just want to make a game with UE4 as it is, then you don't need to build it.

    Originally posted by CGZee View Post
    Here's what I'm seeing:
    1- When launching UE4 from the launcher by clicking on the "Launch" button:
    a- adding a new class will actually open my visual studio2013 express.
    b- Clicking on 'file->open visual studio' will also open VS2013 express
    c- After the file opens in VS2013 express, all I see is the new class code. There are zero UE4 source files or folders.
    So, just use the pre-built version of UE4 that you downloaded from unrealengine.com. Start a new project based on a C++ template and Visual Studio will pop up with basic C++ code for you to play with. It doesn't matter if you don't see the UE4 source code project in your game's solution, UE4 is already compiled, the UnrealBuildTool will automatically link your code with the engine code, all you have to do is #include the headers you need to access UE4 functionality.

    https://docs.unrealengine.com/latest...cts/index.html
    Straight from the documentation:
    Unreal Engine uses a custom building method via the UnrealBuildTool which handles all the complex aspects of compiling the project and linking it with the engine. This process occurs transparently allowing you to simply build the project through the standard Visual Studio build workflow.

    Leave a comment:


  • replied
    You can use the Launcher version, add you code, compile the solution, then close Visual Studio and open your Project's solution file (Myproject.sln located in your project's root folder). That works for me, it open your project in VS with both your Game and the UE4 code.

    Leave a comment:


  • replied
    Here's what I did:

    1- Installed UE4 launcher from UE4 download page.
    2- From the launcher, downloaded and installed UE4
    3- I clicked on verify installation under Launch
    4- downloaded and compiled the github source code version
    both versions are installed in d: drive.

    Here's what I'm seeing:
    1- When launching UE4 from the launcher by clicking on the "Launch" button:
    a- adding a new class will actually open my visual studio2013 express.
    b- Clicking on 'file->open visual studio' will also open VS2013 express
    c- After the file opens in VS2013 express, all I see is the new class code. There are zero UE4 source files or folders.

    2- When launching UE4 manually using the compiled source version in "\UnrealEngine\Engine\Binaries\Win64\UE4Editor";
    a- Adding a new class will not open VS2013 express
    b- Clicking on file->open visual studio will not open VS2013 express and I still get the error message "Could not open Visual Studio 2013 for project D:/GitHub/UnrealEngine/UE4.sln"
    c- by opening the project solution file manually in VS2013 express, I can see all the engine source code along with the project code under the 'game' stanza.


    Really confused now...which version should I use for development:
    1- The one that was installed via the launcher that opens VS2013 but will only show project code without UE4 source code?...or
    2- The compiled github version found in "\UnrealEngine\Engine\Binaries\Win64\UE4Editor" which doesn't open VS2013 express but if opened manually will include all UE4 source code?
    Last edited by CGZee; 04-13-2014, 12:12 AM.

    Leave a comment:


  • replied
    Originally posted by CGZee View Post
    Thank you Ad3ViLl

    I had UE4 installed and then removed it. I only kept the compiled UE4 from source code. Right now the launcher doesn't have the 'verify install' button since UE4 is not actually installed.

    I guess you're saying:
    1- I remove the source folder and the compiled UE4 first
    2- Download and Install UE4 using the just the launcher and nothing else.
    3- Use verify install under Launch
    4- Clone the source code from github, compile, and start working with the compiled version (not the installed version).

    Are those the correct steps I need to take? Do I need to mess with the environment variables (which I already did and nothing changed) ?

    Also, does it matter where I install my UE4 (c: vs d ?
    That's correct. That's how I got mine to work. Hopefully it will work for you too.

    Leave a comment:


  • replied
    Originally posted by Ad3ViLl View Post
    I had a very similar issue. In the end I deleted my unreal folder completely, used the Launcher (Blue Icon) and downloaded the engine with it, then I had to use the "verify install" option under "Launch". That solved my issue. Afterwards I can use the Github version and everything works 100%

    You can take a look here: https://answers.unrealengine.com/que...ject-cunr.html
    Thank you Ad3ViLl

    I had UE4 installed and then removed it. I only kept the compiled UE4 from source code. Right now the launcher doesn't have the 'verify install' button since UE4 is not actually installed.

    I guess you're saying:
    1- I remove the source folder and the compiled UE4 first
    2- Download and Install UE4 using the just the launcher and nothing else.
    3- Use verify install under Launch
    4- Clone the source code from github, compile, and start working with the compiled version (not the installed version).

    Are those the correct steps I need to take? Do I need to mess with the environment variables (which I already did and nothing changed) ?

    Also, does it matter where I install my UE4 (c: vs d ?
    Last edited by CGZee; 04-12-2014, 08:28 PM.

    Leave a comment:


  • replied
    I had a very similar issue. In the end I deleted my unreal folder completely, used the Launcher (Blue Icon) and downloaded the engine with it, then I had to use the "verify install" option under "Launch". That solved my issue. Afterwards I can use the Github version and everything works 100%

    You can take a look here: https://answers.unrealengine.com/que...ject-cunr.html
    Last edited by Ad3ViLl; 04-12-2014, 03:00 PM.

    Leave a comment:


  • replied
    When I go to "file->project->open visual studio" I get the following message:

    "Could not open Visual Studio 2013 for project D:/GitHub/Unreal Projects/test/test.sln"

    Leave a comment:


  • replied
    Originally posted by CGZee View Post
    Does that work for projects created outside the default "c:\documents\unreal projects" folder? I point my newly created projects to point to my d: drive and it never compiles and the errors remain no matter how many times I rebuild.
    Well it does for me, considering my projects are located in D:\Unreal Projects as my C: drive would get full too fast.

    Worth noting that intellisense takes forever to parse the project and that it shows errors until it finished doing that.

    Leave a comment:


  • replied
    Thank you Zeblote

    Originally posted by Zeblote View Post
    I was horribly confused by this at first, hah.
    This always happens when you add a new class with the menu, you need to close the editor and rebuild the solution so it creates the generated header file.
    Does that work for projects created outside the default "c:\documents\unreal projects" folder? I point my newly created projects to point to my d: drive and it never compiles and the errors remain no matter how many times I rebuild.

    Originally posted by Zeblote View Post
    It opens express for me just fine.
    Any setting change I need to make to my UE4 editor? I installed three time and still doesn't open.

    Leave a comment:


  • replied
    Originally posted by CGZee View Post
    2- Inside the header file in the project solution; #include "HelloWorldPrinter.generated.h" has a red underline and the error message reads: Error: cannot open source file HelloWorldPrinter.generated.h for both projects

    similar problem with GENERATED_UCLASS_BODY() (error:expected an identifier)
    and multiple similar types of errors in the source (.cpp) file
    I was horribly confused by this at first, hah.
    This always happens when you add a new class with the menu, you need to close the editor and rebuild the solution so it creates the generated header file.

    Originally posted by Benjiko99 View Post
    Pretty sure the Express version of VS cannot be opened by external applications, you need Professional or Ultimate.
    It opens express for me just fine.

    Leave a comment:


  • replied
    Thank you guys

    Originally posted by Dune View Post
    Do these errors actually happen when you try and build the projects? Sometimes the intellisense is just stupid and doesn't pick up certain things until you try and build. Also, are you using any other VS environments on your computer?
    They happen as soon as I open the solution and the header file. For projects that were saved in the default "c:\documents\unreal projects\", building and rebuilding couple of times actually helped and errors disappeared. But for projects that were saved in "D:\GitHub\UnrealEngine\Unreal Projects" when they were created, building and rebuilding never solved the problem and errors still exist. I can't just keep creating projects in my c: drive. it's almost full now. BTW, all UE4 engine files are in my d: drive. The only thing that was automatically created in c: was the unreal projects folder.

    Originally posted by Benjiko99 View Post
    Pretty sure the Express version of VS cannot be opened by external applications, you need Professional or Ultimate.
    The generated.h files dont exist in the beginning. They will get generated by the macros during the compilation, just ignore the error and build the project, it should work just fine.
    Thanks for the VS Express info.! That's probably why it's not opening.
    As mentioned above, building projects that are not in the default 'c:\documents\unreal projects' folder never works.

    Leave a comment:


  • replied
    Originally posted by Benjiko99 View Post
    Pretty sure the Express version of VS cannot be opened by external applications
    It can be.

    Leave a comment:


  • replied
    Pretty sure the Express version of VS cannot be opened by external applications, you need Professional or Ultimate.
    The generated.h files dont exist in the beginning. They will get generated by the macros during the compilation, just ignore the error and build the project, it should work just fine.

    Leave a comment:


  • replied
    Do these errors actually happen when you try and build the projects? Sometimes the intellisense is just stupid and doesn't pick up certain things until you try and build. Also, are you using any other VS environments on your computer?

    Leave a comment:

Working...
X