Building NaCl with Visual Studio 2012 Compiler Mismatch

432 views
Skip to first unread message

Nathan L.

unread,
Jul 29, 2014, 1:24:12 PM7/29/14
to native-cli...@googlegroups.com
Is there a NaCl SDK version built with Visual Studio 2012 (VS12)?

I've VS12 professional edition on my machine (no VS10). I've added the preliminary version of the VS12 add-in as per the instructions in the following posting:


I'm now trying to build the hello_cacl_cpp example project (with #ifdef STEP2 turned on) in VS12.

C:\NaCl_SDK\vs_addin\examples\hello_nacl_cpp\hello_nacl_cpp

I'm getting the following error from VS12:

error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in hellow_nacl_cpp.obj

This error is apparently because (please correct me if I'm wrong) the "instance.o" is compiled with Visual Sudio 2010 (VS10).

I'm running NaCl SDK pepper_36 (beta) version.

I guess I can install the Express version of 2010 on my machine and have VS12 to compile and link using VS10 toolset. But that defeats the purpose of using VS12.

I'm looking for any available solutions please!

Nathan L.

unread,
Jul 29, 2014, 1:39:14 PM7/29/14
to native-cli...@googlegroups.com
BTW, here's the full error text:

ppapi_cpp.lib(instance.o) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in hello_nacl_cpp.obj

Nathan L.

unread,
Jul 29, 2014, 4:50:59 PM7/29/14
to native-cli...@googlegroups.com
Tried to use VS2010 Express, but I just remembered this note from Google:

The Native Client add-in requires Visual Studio 2010 with Service Pack 1. No other versions of Visual Studio are currently supported. Visual Studio Express is also not supported.

So, I like to know how difficult/easy is to build NaCl SDK libraries in VS2012 from source file? Has anyone done this? Any documentations on how to do this?


On Tuesday, July 29, 2014 10:24:12 AM UTC-7, Nathan L. wrote:

Sam Clegg

unread,
Jul 29, 2014, 8:28:33 PM7/29/14
to native-cli...@googlegroups.com
Hi Nathan,

Yes, we currently only ship prebuilt libraries for VS2010. This will
only effect the PPAPI platform is Visual Studio, you should be able to
build NaCl and PNaCl targets just fine.

If you want to rebuild the libraries that we ship with VS2012 is
fairly straight forward. The sources for the libraries live in
NACL_SDK_ROOT/src. To rebuild ppapi_cpp, for example, you would do:

$ cd $NACL_SDK_ROOT\src\ppapi_cpp
$ make TOOLCHAIN=win CONFIG=Debug
$ make TOOLCHAIN=win CONFIG=Release

You should do this in terminal environment setup with version of
Visual Studio you want to build with. This will result in the library
being rebuilt and placed in the $NACL_SDK_ROOT/lib tree.

In the future we should probably begin shipping libraries pre-built
for multiple versions of visual studio, or at least documenting a
simple way to rebuild.

cheers,
sam
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to native-client-di...@googlegroups.com.
> To post to this group, send email to native-cli...@googlegroups.com.
> Visit this group at http://groups.google.com/group/native-client-discuss.
> For more options, visit https://groups.google.com/d/optout.

Nathan L.

unread,
Aug 1, 2014, 12:55:26 PM8/1/14
to native-cli...@googlegroups.com

Thanks, Sam. The make commands ran smoothly & it did solve the problem.

-Nathan

qushe...@163.com

unread,
Oct 13, 2015, 4:25:24 AM10/13/15
to Native-Client-Discuss
Hello Sam,

I get similar problem.

I want to use VS2012 test the example "hello_nacl_cpp" but I get  errors like  :  ppapi_cpp.lib(module.o) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1700' in hello_world.obj .

I use the "nacl_sdk/pepper_43". I should use VS2013?





在 2014年7月30日星期三 UTC+8上午8:28:33,Sam Clegg写道:

Sam Clegg

unread,
Oct 15, 2015, 6:15:31 PM10/15/15
to native-cli...@googlegroups.com
On Tue, Oct 13, 2015 at 1:25 AM, <qushe...@163.com> wrote:
> Hello Sam,
>
> I get similar problem.
>
> I want to use VS2012 test the example "hello_nacl_cpp" but I get errors
> like : ppapi_cpp.lib(module.o) : error LNK2038: mismatch detected for
> '_MSC_VER': value '1800' doesn't match value '1700' in hello_world.obj .
>
> I use the "nacl_sdk/pepper_43". I should use VS2013?

Have you tried rebuilding the ppapi_cpp library as I described?
>> > email to native-client-di...@googlegroups.com.
>> > To post to this group, send email to native-cli...@googlegroups.com.
>> > Visit this group at
>> > http://groups.google.com/group/native-client-discuss.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to native-client-di...@googlegroups.com.

James Berger

unread,
May 11, 2017, 9:40:03 AM5/11/17
to Native-Client-Discuss
Hello,

I am trying this out and currently getting this problem:

Error 1 error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1700' in rplot.obj C:\Development\Web Development\Rapid Radar Plot\rplot\ppapi_cpp.lib(instance.o) rplot

But when I try the "solution" above I get this error in my cmd:

C:\nacl_sdk\pepper_49\src\ppapi_cpp>make TOOLCHAIN=win CONFIG=Release
C:\nacl_sdk\pepper_49/tools/host_vc.mk:23: To skip the host build use:
C:\nacl_sdk\pepper_49/tools/host_vc.mk:24: "make NO_HOST_BUILDS=1"
C:\nacl_sdk\pepper_49/tools/host_vc.mk:25: *** Unable to find cl.exe in PATH while building Windows host build.  Stop.

Any suggestions?
>> > To post to this group, send email to native-cli...@googlegroups.com.
>> > Visit this group at
>> > http://groups.google.com/group/native-client-discuss.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Sam Clegg

unread,
May 18, 2017, 11:42:27 AM5/18/17
to native-cli...@googlegroups.com
On Thu, May 11, 2017 at 6:40 AM, James Berger <jame...@gmail.com> wrote:
> Hello,
>
> I am trying this out and currently getting this problem:
>
> Error 1 error LNK2038: mismatch detected for '_MSC_VER': value '1800'
> doesn't match value '1700' in rplot.obj C:\Development\Web Development\Rapid
> Radar Plot\rplot\ppapi_cpp.lib(instance.o) rplot
>
> But when I try the "solution" above I get this error in my cmd:
>
> C:\nacl_sdk\pepper_49\src\ppapi_cpp>make TOOLCHAIN=win CONFIG=Release
> C:\nacl_sdk\pepper_49/tools/host_vc.mk:23: To skip the host build use:
> C:\nacl_sdk\pepper_49/tools/host_vc.mk:24: "make NO_HOST_BUILDS=1"
> C:\nacl_sdk\pepper_49/tools/host_vc.mk:25: *** Unable to find cl.exe in PATH
> while building Windows host build. Stop.
>
> Any suggestions?

You need to have the toolchain (cl.exe) in your PATH to build stuff
for windows. The normal way to do this is to use the Visual Studio
command prompt (https://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx)
>> >> > email to native-client-di...@googlegroups.com.
>> >> > To post to this group, send email to native-cli...@googlegroups.com.
>> >> > Visit this group at
>> >> > http://groups.google.com/group/native-client-discuss.
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Native-Client-Discuss" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to native-client-di...@googlegroups.com.
>> > To post to this group, send email to native-cli...@googlegroups.com.
>> > Visit this group at
>> > http://groups.google.com/group/native-client-discuss.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to native-client-di...@googlegroups.com.
> To post to this group, send email to native-cli...@googlegroups.com.
> Visit this group at https://groups.google.com/group/native-client-discuss.
Reply all
Reply to author
Forward
0 new messages