Building on Windows
- For instructions on how to obtain and build the AllJoyn™ Core source for Windows, go here.
- For instructions on how to obtain and build the AllJoyn™ Base Services source for iOS, go here. Please not that building Core is a prerequisite for Base Services.
Adding to a new/existing project
Visual Studio 2012, 2013, or 2015
Click on C/C++.
Edit Additional Include Directories and add
NOTE: ALLJOYN_SDK_HOME is the
distdirectory created by building Core. It is found under
Select Preprocessor under C/C++.
Edit Preprocessor Definitions and add QCC_OS_GROUP_WINDOWS and UNICODE.
Click on Linker.
Edit Additional Library Directories and add
Click on Input found under the "Linker" section.
Enter the following libraries:
Click OK. You are now ready to start using the AllJoyn APIs.
Perform the following steps at a high level. Changes may be needed due to how the existing Makefile is structured.
- Open your Makefile.
Create a new variable named ALLJOYN_DIST to point to the AllJoyn SDK.
ALLJOYN_DIST := <path_to_dist>
Create a new variable named ALLJOYN_LIB to point to the AllJoyn library.
ALLJOYN_LIBS := -l$(ALLJOYN_DIST)/cpp/lib/alljoyn.lib -l$(ALLJOYN_DIST)/cpp/lib/ajrouter.lib -l$(ALLJOYN_DIST)/cpp/lib/BundledRouter.obj
ALLJOYN_REQUIRED_LIBS := -lws2_32.lib -lSecur32.lib -lcrypt32.lib -lBcrypt.lib, -lNcrypt.lib -liphlpapi.lib
Modify CXXFLAGS if present, or add to compile command:
Modify the include section to add:
$(ALLJOYN_LIB) $(ALLJOYN_REQUIRED_LIBS)to the Linker command: