Hi, You want to either use the command line directly to let the tool build for you, or set up your IDE to use it for building DCJ files. The reason is that you want to link in the messaging library, which you are not doing right now (just compiling your source, which doesn't define MyNodeId(), so you can't link it into a runnable binary).
I don't know Xcode, so I can't help you with that part, but instructions to use the dcj tool from the terminal are in our quickstart guide. It looks from the screenshot that you are using some version of MacOS or OS/X, which are unix-based, so running from the terminal should work. Messages to this group will be withheld during the round, as you can't ask for help during the round. You are welcome to try the "Ask a Question" link if you have trouble with the system, and we'll do our best to help. Keep in mind that we have limited time, so help with setting up your environment may not be as extensive as you might need. Good luck today! Pablo On Sun, May 14, 2017 at 12:06 AM, 何凱鈞 <[email protected]> wrote: > I'm new to DCJ, and after reading the quick-start guide, the FAQ and the > README file in the package, I still can't understand how to use it. > I'm using Xcode (newest version), after I drag the files into the project > and white the code below, it can't compile, with a linker error. Screenshot > here: http://imgur.com/a/huxvq > > #include "message.h" > #include "zeus.h" > #include <bits/stdc++.h> > using namespace std; > > int main(){ > if (MyNodeId() == 0) { > cout << "Hello world!\n"; > } > } > > Can someone explain better how to use the local testing tool? Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/google-code/fe8eb9e6-a7d2-4d91-a854-b517e7024fb8%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/CANa5jcCcc9baAU42r0L7Gv7GmayOA%3Dk4iP1-izeBp5ViTwb8aw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
