error C2628: '_VARIANT_BOOL' followed by 'bool' is illegal (did you forget a ';'?) in msvc

412 views
Skip to first unread message

Padikar

unread,
Jun 22, 2016, 5:52:20 AM6/22/16
to NAR Maven plugin, madhu...@hpe.com
Hi,

We started using Nar plugin to integrate native with maven.
I am getting loads of errors while compiling with nar. 

I gooled the errors, but could not get more info to resolve. 

Can anyone help me in resolving them?
Attached pom file and result of mvn clean compile -X

Please guide me :)

Thanks
Padikar

res.txt
pom.xml

Greg Domjan

unread,
Jun 22, 2016, 6:14:52 AM6/22/16
to NAR Maven plugin, madhu...@hpe.com

You don't need <define>_MSC_VER</define> as it is defined by the compiler with the compiler version number

I double checked with 1 of my COM projects adding this and got the same error.
By overriding the version making it empty it is stopping inclusion of some headers parts used by COM.

Padikar

unread,
Jun 22, 2016, 9:06:36 AM6/22/16
to NAR Maven plugin
Thanks a lot Greg Domjan.it's passed the error.

I am getting one more error related to wchar_t.

The error says "cannot convert argument 2 from wchar_t to LPTSTR. "

Is there any options to set Unicode format for character set in configuration section of pom file ?

Greg Domjan

unread,
Jun 22, 2016, 9:22:15 AM6/22/16
to NAR Maven plugin

There isn't a config element for Character set as it's specific to VC.

Choosing "Use Unicode character set" in Visual studio sets the following defines
<define>_UNICODE</define>
<define>UNICODE</define>

Alternate is <define>_MBCS</define>

Padikar

unread,
Jun 22, 2016, 9:45:54 AM6/22/16
to NAR Maven plugin
Compilation successful☺
Linking is giving me issues.

How to provide linker path in pom for linker libraries. ?

Padikar

unread,
Jun 23, 2016, 1:18:27 AM6/23/16
to NAR Maven plugin
I am able to resolve the linker issue. Now getting 

[ERROR] cryptlib.lib(fipstest.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in BpmUserAdd.c4484ed5.obj 

error.


which tag i need to use to specify Runtime Library?


and also


I need to create Executable (.exe), which tag i need to use to create .exe file ?

Padikar

unread,
Jun 23, 2016, 4:48:43 AM6/23/16
to NAR Maven plugin
I am able to resolve the linker issue. Now getting 

[ERROR] cryptlib.lib(fipstest.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in BpmUserAdd.c4484ed5.obj 

error.


which tag i need to use to specify Runtime Library?


and also


I need to create Executable (.exe), which tag i need to use to create .exe file ?


Greg Domjan

unread,
Jun 23, 2016, 7:26:06 AM6/23/16
to NAR Maven plugin

Not familiar with this error, but by the labels assume you would need to add something along the lines of the following config

<runtime>static</runtime>
<cpp>
<multiThreaded>true</multiThreaded>
</cpp>

Padikar

unread,
Jun 23, 2016, 7:43:07 AM6/23/16
to NAR Maven plugin
Thanks Greg ,

I did that. No linker error.

But exe is not getting created.
I need to create Executable (.exe), which tag in pom i need to use to create .exe file ?
Or any settings I need to do?

Henrik Horneber

unread,
Jun 23, 2016, 8:48:18 AM6/23/16
to NAR Maven plugin
Check the samples.


--
You received this message because you are subscribed to the Google Groups "NAR Maven plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-nar+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
"I find many of the machines of violence very attractive. Tanks, airplanes, warships, especially aircraft carriers."
- 14th Dalai Lama

Padikar

unread,
Jun 23, 2016, 9:04:35 AM6/23/16
to NAR Maven plugin
samples meaning?

are there any attached files?

Henrik Horneber

unread,
Jun 23, 2016, 9:23:44 AM6/23/16
to NAR Maven plugin

Padikar

unread,
Jun 27, 2016, 2:40:25 AM6/27/16
to NAR Maven plugin
Thanks a lot Henrik and Greg ,

The sample projects and tips by helped me to resolve all my issues. I am able to build my code successfully. 
Reply all
Reply to author
Forward
0 new messages