Hi Tom, I've attached a sample.
Main.c initializes the runtime and calls the managed Test.Intitialize() which in turn registers an AddDelegate with main.c. Main.c invokes this delegate and finds the answer. Robert On 23.01.2013 22:42, tomason wrote:
Well, I'm obviously doing something wrong! Adding that linker flag didn't help. All I can find are code snippets. Is there a full working sample (like the other samples in git) that I could look at somewhere? What I'm doing wrong must be something that the code snippets assume I know, but I don't. =) Thanks again! -Tom On Wed, Jan 23, 2013 at 1:12 PM, Robert Jordan [via Mono] < [email protected]> wrote:On 23.01.2013 20:57, Robert Jordan wrote:Yes, 'extern "C"' is a must. You may need to add -Wl,--export-dynamic to your cflags when compiling the main program. This will instruct the linker to export all public symbols as if the program where a library.It should read "were a library" ;) Robert _______________________________________________ Mono-list maillist - [hidden email]<http://user/SendEmail.jtp?type=node&node=4658252&i=0> http://lists.ximian.com/mailman/listinfo/mono-list ------------------------------ If you reply to this email, your message will be added to the discussion below: http://mono.1490590.n4.nabble.com/NullReferenceException-when-calling-thunk-tp4658230p4658252.html To unsubscribe from NullReferenceException when calling thunk, click here<http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658230&code=dG9tQGNyZWFteXNvZnQuY29tfDQ2NTgyMzB8LTE3MTUxMzM0Nzg=> . NAML<http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>-- View this message in context: http://mono.1490590.n4.nabble.com/NullReferenceException-when-calling-thunk-tp4658230p4658253.html Sent from the Mono - General mailing list archive at Nabble.com. _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
rpinvoke.tar.gz
Description: GNU Zip compressed data
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
