Ah, I see, so _main is exported by default, but adding anything to 
EXPORTEDFUNCTIONS without also explicitly adding _main will remove this 
default behavior. This seems like something that should be mentioned in the 
documentation somewhere.

On Monday, March 3, 2014 8:55:27 PM UTC-8, Alon Zakai wrote:
>
> The second command does not export main, since you only ask for that other 
> function to be exported. So it makes sense that nothing would be executed 
> (except for global constructors) in that case.
>
> - Alon
>
>
>
> On Mon, Mar 3, 2014 at 7:54 PM, Joel Croteau <[email protected]<javascript:>
> > wrote:
>
>> I just export one other function that is not main. To be specific, my 
>> build command without exporting is this:
>>
>> ~/emscripten/em++ BaseApplication.cpp TutorialApplication.cpp 
>> -L$HOME/ogre-ems/lib/ -I$HOME/ogre-ems/include/OGRE/Overlay 
>> -I$HOME/ogre-ems/include/OIS -I$HOME/ogre-ems/include/OGRE -lOgreMain 
>> -lOgreOverlay -lOgreRTShaderSystem -Os --preload-file OGRE/@. -o index.html 
>> -s DISABLE_EXCEPTION_CATCHING=0 -s TOTAL_MEMORY=96*1024*1024 
>> -lOGRE/RenderSystem_GLES2 -s RETAIN_COMPILER_SETTINGS=1 
>> -I$HOME/ogre-ems/include/OGRE/RenderSystems/GLES2 -Wno-warn-absolute-paths 
>> -Wno-c++11-extensions
>>
>> The HTML output by this runs as expected. When I add the export of one 
>> function though:
>>
>> ~/emscripten/em++ BaseApplication.cpp TutorialApplication.cpp 
>> -L$HOME/ogre-ems/lib/ -I$HOME/ogre-ems/include/OGRE/Overlay 
>> -I$HOME/ogre-ems/include/OIS -I$HOME/ogre-ems/include/OGRE -lOgreMain 
>> -lOgreOverlay -lOgreRTShaderSystem -Os --preload-file OGRE/@. -o index.html 
>> -s DISABLE_EXCEPTION_CATCHING=0 -s TOTAL_MEMORY=96*1024*1024 
>> -lOGRE/RenderSystem_GLES2 -s RETAIN_COMPILER_SETTINGS=1 
>> -I$HOME/ogre-ems/include/OGRE/RenderSystems/GLES2 -Wno-warn-absolute-paths 
>> -Wno-c++11-extensions -s 
>> EXPORTED_FUNCTIONS="['BaseApplication_fetch_update']"
>>
>> The HTML output by this does nothing and does not even produce an error 
>> message at the console.
>>
>> On Monday, March 3, 2014 7:48:38 PM UTC-8, Alon Zakai wrote:
>>
>>> Do you have a main function that is not called when you include 
>>> something in EXPORTED_FUNCTIONS?
>>>
>>> Do you still export main in the list given to EXPORTED_FUNCTIONS, or do 
>>> you just export other things?
>>>
>>> - Alon
>>>
>>>
>>>
>>> On Mon, Mar 3, 2014 at 7:34 PM, Joel Croteau <[email protected]> wrote:
>>>
>>>> Perhaps it is the way I am calling it. I am compiling my code+libraries 
>>>> to an html output, which normally automatically runs the main function 
>>>> when 
>>>> loaded. If I include anything in -s EXPORTED_FUNCTIONS, with no other 
>>>> changes, nothing happens when I load the HTML. What I mean is that I get a 
>>>> blank text box, and no output at all in the debug console. Is this by 
>>>> design, and do I need to alter the HTML to manually invoke the doRun 
>>>> function?
>>>>
>>>>
>>>> On Monday, March 3, 2014 6:19:22 PM UTC-8, Joel Croteau wrote:
>>>>>
>>>>> I have an application that displays data loaded from a server, and I 
>>>>> would like to be able to pass it information on what data to load. 
>>>>> Ideally 
>>>>> I would like to have a text box on the page along with a button that 
>>>>> calls 
>>>>> a member of a C++ class instance and tells it to update itself. This 
>>>>> instance is running continually via emscripten_set_main_loop. Embind is 
>>>>> apparently not supported in fastcomp, and if I try to export any 
>>>>> functions 
>>>>> via -s EXPORTED_FUNCTIONS, the code apparently thinks it's a side module 
>>>>> and doesn't run. Can this be fixed? Failing that, I could pass the data 
>>>>> to 
>>>>> load via the HTTP query string. Is there a simple way to access this from 
>>>>> within emscripten?
>>>>>
>>>>  -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "emscripten-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to