how to include .cpp files in project without editor?

same as title.

how to include cpp files in project without editor??

i can’t include files just in Visual studio. with ‘not include in module,…’ error.

Edit: Have u tried using the Add->Class?

You should be able to create a simple text file, give it the appropriate file extension and place it in your source directory structure.
From there, Right-Click on your .uproject file and select “Generate Visual Studio Files”.
I’ve done this several times when I can’t be bothered opening the editor.

ye i already do that,
it’s not just simple problem like that.

it’s very hard to create new file into project!!

When you right-click your game’s folder name in the solution explorer and click 'Add->New Item" and click ‘C++ File (.cpp)’, what does the location for where the file will be saved say? You need to make sure it goes into your source directory:

C:\Users\Username\Documents\Unreal Projects\SomeGameName\Source\SomeGameName

otherwise the file wont be found by visual studio when you re-open it and nor will the editor and ti will be placed in ‘C:\Users\Username\Documents\Unreal Projects\SomeGameName\Intermediate\ProjectFiles’

ye i know that problem when choose location.

but that is not solved this problem…(i have done 2, all location)

i got a error 'it’s not include in game module ‘addfile.cpp…’ when i build with add-> new item ‘addfile.cpp’ files.

It won’t be part of the game module itself as it is just another .cpp file that you have created? That is, unless you inherit from one of the base classes or a previous class you have already setup through the editor?
What kind of class are you actually trying to add to your project and why would you not just use the editors File->Add new code to project?

i want to add class for serial communication with hardware sensor’s (arduino).

http://playground.arduino.cc/Interfacing/CPPWindows

here is .cpp source for serial.

this is what i want to add in project.

if it’s just simple C++ project(not unreal) it’s easy, but i don’t know how to do it in unreal OTL…

thx to reply.

Can you paste the full error you’re getting?