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"

Where is the definition for main() ?

I'm interested to see how UE4 handles main() internally. It must have one just like any other C++ application. If not, then how does this work?

Product Version: UE 4.9
Tags:
more ▼

asked Sep 02 '15 at 11:27 PM in C++ Programming

avatar image

Riful
56 3 7 16

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

1 answer: sort voted first

The classic main function can be found in the Launch module in Engine\Source\Runtime\Launch.

There it depends on the platform.

For Windows You have LaunchWindows.cpp where is the

 int32 WINAPI WinMain( HINSTANCE hInInstance, HINSTANCE hPrevInstance, char*, int32 nCmdShow )

For iOS You have LaunchIOS.cpp with the

 int main(int argc, char *argv[])

You can also check the IOSAppDelegate.cpp from the Core module, where the most important Objective-C stuff is done.

For Android there is LaunchAndroid.cpp with

 void android_main(struct android_app* state)

This one is little tricky, because it uses the native c++ NDK to work.

Unfortunatelly I don't have experience with other platforms.

I know the answer only scratch the surface how UE4 rolls, but I think this is good place to start.

But in fact, unless You don't want to modify the core of the Engine You don't have to bother about it.

more ▼

answered Nov 25 '15 at 06:33 PM

avatar image

zompi2
650 24 47 145

(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