Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#53 closed user support (wontFix)

Failed to install qpOASES on Windows using Visual Studio

Reported by: wellbeing Owned by: ferreau
Priority: normal Milestone:
Component: C++ core Version: 3.2.0
Keywords: Cc:


Dear Sir or Madam,

I tried to install/compile qpOASES on Windows 10 using Visual Studio 2013. Specifically, I typed "nmake" in the command line of Developer Command Prompt for VS2013 and then I got the following error: : fatal error U1000: syntax error : ')' missing in macro invocation

According to this error, I modified "TOP = $(realpath $(dir $(lastword $(MAKEFILE_LIST))))" in the file as "TOP = $(realpath) $(dir) $(lastword) $(MAKEFILE_LIST)", then the error disappeared. However, at the same time, I got a new error: : fatal error U1000: syntax error : ')' missing in macro invocation

which is caused by "include ${TOP}/" in the file. Tentatively, I revised "include ${TOP}/" as "include", in this way, I got the following error: : fatal error U1001: syntax error : illegal character '{' in macro

Could someone help me to complete the installation? Thanks very much.

Change History (3)

comment:1 Changed 4 years ago by ferreau

I have little experience in using nmake, but it does not seem to be straightforward to provide cross-platform makefiles that run both under Linux and Windows. I guess this is the reason tools like CMake have been developed.

Though it is possible to install qpOASES using CMake and CMake supports to export Visual Studio projects, this possibility is currently not implemented. We appreciate anybody's help in extending the current CMake setup to generate Visual Studio projects for qpOASES as we cannot take care of this ourselves.

Last edited 4 years ago by ferreau (previous) (diff)

comment:2 Changed 4 years ago by ferreau

  • Resolution set to wontFix
  • Status changed from new to closed

comment:3 Changed 3 years ago by shaww

Hello I had this same issue trying to install for using Visual Studio. After searching through forums I ended up with the following steps that uses CMake to install qpOASES:

  1. Install CMake for Windows from the website
  2. Open the developer command prompt for Visual Studio: Start -> All Programs -> Visual Studio 2015 -> Visual Studio Tools
  3. Make sure the path is set for visual studio to recognize cmake, type the following in the command prompt (replace with the appropriate location of your CMake):

set PATH="C:\Program Files\CMake\bin\

  1. In the command prompt cd to the qpOASES\ directory where CMakeLists.txt is located
  2. Run the following commands (for the appropriate version of Visual Studio):

mkdir build
cd build
cmake -G "Visual Studio 15 2017" ..
cmake --build

  1. Navigate to the build directory, double click on the ALL_BUILD (the VC++ project) and wait for Visual Studio to open
  2. Set the build type to "Release", right click ALL_BUILD and select build
  3. Right click INSTALL and select build

The library files should now be installed in the Program Files directory of your computer. You should be able to add the include and library files in your Visual Studio project and start working with qpOASES.

Note: See TracTickets for help on using tickets.