2

Why do I get this warning whenever I compile an alchemy swc?

WARNING: While resolving call to function 'main' arguments were dropped!

Is there any way to disable or fix the warning?

aaaidan
  • 7,093
  • 8
  • 66
  • 102

1 Answers1

1

While I don't know what the warning is referring to, I've never found it to be a problem. Compiling a command-line tool via Alchemy will accept arguments to main.

Unfortunately there doesn't appear to be a way to pass arguments to main via AS3/CLibInit. I don't think this has anything to do with the warning-- the args just don't appear to be exposed to AS3.

As a workaround I've been using environment variables (via putEnv) to pass in parameters for main to read.

paleozogt
  • 6,393
  • 11
  • 51
  • 94
  • I believe it is related to the error. The error simply says that main arguments were dropped and that's exactly what happens, Main is essentially overridden/bypassed, since what happens is you enter the VM's main loop and thus it's impossible (prohibited) to enter your own. –  Apr 24 '11 at 17:30
  • When you use a program compiled for swfbridge it shows the same error, and yet args can be passed to main. – paleozogt Apr 25 '11 at 15:01
  • Not seeing how swfbridge and the main loop of a C program are related...? –  Apr 25 '11 at 15:33