getting "fatal error RC1106: invalid option: -ologo" on visual studio 2010 and 2013

1,312 views
Skip to first unread message

dheeraj mits

unread,
Oct 19, 2015, 1:43:42 AM10/19/15
to DynamoRIO Users
Hi,

I am trying to build DynamoRIO on windows 7 by following steps on https://github.com/DynamoRIO/dynamorio/wiki/How-To-Build.
I am using cmake for building.
But I am getting following error for many projects:

           fatal error RC1106: invalid option: -ologo

that wiki page explains similer error for ninja for Pre-7.0 SDK.

Using Ninja With Pre-7.0 SDK

If you end up using the (no longer officially supported) Visual Studio 2008, it's best to pair it with a pre-7.0 SDK, but Ninja runs into a problem there running rc.exe:

fatal error RC1106: invalid option: -ologo

A workaround is to copy rc.exe and rcdll.dll from a post-7.0 SDK into the pre-7.0 SDK Bin directory, with admin privileges:

mv /c/Program\ Files/Microsoft\ SDKs/Windows/v6.0A/Bin/RC.Exe /c/Program\ Files/Microsoft\ SDKs/Windows/v6.0A/Bin/RC-ORIG.Exe
mv /c/Program\ Files/Microsoft\ SDKs/Windows/v6.0A/Bin/RcDll.Dll /c/Program\ Files/Microsoft\ SDKs/Windows/v6.0A/Bin/RcDll-ORIG.Dll
cp /c/Program\ Files/Microsoft\ SDKs/Windows/v7.1/Bin/RC.Exe /c/Program\ Files/Microsoft\ SDKs/Windows/v6.0A/Bin/   
cp /c/Program\ Files/Microsoft\ SDKs/Windows/v7.1/Bin/RcDll.Dll /c/Program\ Files/Microsoft

But I am already on Post 7.1 SDK.

any idea how to fix this?

Derek Bruening

unread,
Oct 19, 2015, 1:41:31 PM10/19/15
to dynamor...@googlegroups.com
What does "rc /?" say?

Describing the full build env would help.  What are you building with (cmake just configures): are you using ninja or VS generators, and with VS there are multiple options for building as well: msbuild from custom cygwin, from vcvars cmd, from IDE?  Which version of VS and of SDK?  Which version of cmake?

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To post to this group, send email to dynamor...@googlegroups.com.
Visit this group at http://groups.google.com/group/dynamorio-users.
For more options, visit https://groups.google.com/d/optout.

dheeraj mits

unread,
Oct 19, 2015, 1:59:09 PM10/19/15
to DynamoRIO Users
Hi,

I am not build using cygwin I am using win cmd prompt to build.
I tried vs 2010 sp1 (win xp ) and vs 2013  ( win 7 )
SDK version 7.1 and 8.
cmake version:  cmake-3.4.0

two rc versions I tried:

C:\Program Files\Microsoft Visual Studio 10.0\VC>rc /?

Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
Copyright (C) Microsoft Corporation.  All rights reserved.

And
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC>rc /?

Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.16384
Copyright (C) Microsoft Corporation.  All rights reserved.

I am using cmakeVS generators

cmake -G"Visual Studio <version> ..

Derek Bruening

unread,
Oct 19, 2015, 10:31:56 PM10/19/15
to dynamor...@googlegroups.com
That first version is what I use and it works fine.  You didn't paste the rest, but mine shows /nologo as a supported option:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>rc /?
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
   ...
   /nologo  Suppress startup logo

Maybe some other rc is found by cmake.  Check what's in the CMakeCache.txt.

dheeraj mits

unread,
Oct 19, 2015, 11:32:38 PM10/19/15
to DynamoRIO Users
Actually  rc command on my box support /nologo option. Not sure why its getting -ologo instead of -nologo.

C:\Program Files\Microsoft Visual Studio 10.0\VC>rc /nologo
fatal error RC1107: invalid usage; use RC /? for Help

C:\Program Files\Microsoft Visual Studio 10.0\VC>rc -nologo
fatal error RC1107: invalid usage; use RC /? for Help

C:\Program Files\Microsoft Visual Studio 10.0\VC>rc -ologo

fatal error RC1106: invalid option: -ologo

Following from CMakeCache.txt:

//RC compiler
CMAKE_RC_COMPILER:FILEPATH=rc

//Flags for Windows Resource Compiler.
CMAKE_RC_FLAGS:STRING=' /DWIN32 '

dheeraj mits

unread,
Oct 20, 2015, 12:53:38 AM10/20/15
to DynamoRIO Users
 I used following command to build:

$ git clone https://github.com/DynamoRIO/dynamorio.git
$ cd dynamorio && mkdir build && cd build
$ cmake -G"Visual Studio 10" ..
$ cmake --build . --config RelWithDebInfo

dheeraj mits

unread,
Oct 20, 2015, 1:32:01 PM10/20/15
to DynamoRIO Users
Just to unblock myself for now I have set CMAKE_RC_FLAGS to "" in main "CMakeLists.txt" file.

  if (CMAKE_RC_FLAGS)
    set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} ")
  else ()
    set(CMAKE_RC_FLAGS "")
  endif ()

Derek Bruening

unread,
Oct 20, 2015, 2:58:59 PM10/20/15
to dynamor...@googlegroups.com
On Mon, Oct 19, 2015 at 1:59 PM, dheeraj mits <ddon...@gmail.com> wrote:
cmake version:  cmake-3.4.0

cmake -G"Visual Studio <version> ..

I doubt that anyone has tried cmake 3.3+ without using ninja, so perhaps that is the problem.  Could you file an issue on this, which is likely limited to recent cmake versions and not using ninja?  In general, ninja is the way to go if building from the command line as everything else is painful to use.
Reply all
Reply to author
Forward
0 new messages