Problem with Wire library call from main()

You can do some research, and look at the code provided with the IDE, or look at the .cpp file created from your .ino file to see what main() actually does when the IDE creates it.

One thing it does that your main doesn't is that it calls init() before setup().