Building on Windows
Getting Started
- 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
Open Project>Properties.
Click on C/C++.
Edit Additional Include Directories and add
$(ALLJOYN_SDK_HOME)\inc.NOTE: ALLJOYN_SDK_HOME is the
distdirectory created by building Core. It is found underbuild\{OS}\{CPU}\{VARIANT}\.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
$(ALLJOYN_SDK_HOME)\lib.Click on Input found under the "Linker" section.
Enter the following libraries:
alljoyn.lib;ajrouter.lib;ws2_32.lib;Secur32.lib;crypt32.lib;Bcrypt.lib;Ncrypt.lib;iphlpapi.lib.Click OK. You are now ready to start using the AllJoyn APIs.
Makefile
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.objALLJOYN_REQUIRED_LIBS := -lws2_32.lib -lSecur32.lib -lcrypt32.lib -lBcrypt.lib, -lNcrypt.lib -liphlpapi.libModify CXXFLAGS if present, or add to compile command:
-DQCC_OS_GROUP_WINDOWSModify the include section to add:
-I$(ALLJOYN_DIST)/cpp/incAdd
$(ALLJOYN_LIB) $(ALLJOYN_REQUIRED_LIBS)to the Linker command:
Social Links