Error c1189 visual c++

error c1189 visual c++

Related Query · Error C1189 MFC · MBCS Error building MFC C++ project with Visual Studio · error C1189 after installing Visual Studio 2010 · Win32 Project. stackoverflow.com › questions › error-c1189-mfc. C1189 is generated by the #error directive. The developer who codes the directive specifies the text of the error message.

Error c1189 visual c++ - necessary try

[Rose]">
No, I am NOT saying that you want to merge porn mpeg clips into a mpeg "movie". NoooooooooEek!   <inherit from parent or project defaults> } <br></td></tr></table><br>I've tried all four settings, all four result in an error.<br><br>Edit to add:<br>USE STANDARD LIBRARIES, USE SHARED DLL amd INHERIT PROJECT DEFAULTS all result in the above message. <br>USE MFC IN STATIC LIBRARY results in <br><table><tr><td><br> 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\atlmfc\include\afxver_.h(77,1): fatal error C1189: #error:  Please use the /MD switch for _AFXDLL builds<br></td></tr></table><br><br>I've tried creating the project from scratch and still get the same errors. </div><p>Last edited on </p></div> <div><div><div><h3>Compiler Version Problem</h3><div><div><div><p>Hello,</p><p>I am trying to install Freeling in a computer with Windows 10 (64 bits).<br> I already download all pre requisites and create de build folder.<br> But, when I execute “nmake install” command the installation was interrupted and print an error message as follow:“#error:  STL1001: Unexpected compiler version, expected MSVC 19.15 or newer”.<br> I am using Visual Studio 2017 (Express Edition) with MSVC version 14.16.27023 and Freeling version 4.2.<br> Please could you tell What am I doing wrong?</p><p>Regards,<br> M.</p></div><p>lluisp</p><p>Mon, 08/30/2021 - 10:14</p><p>Permalink</p><div><h3>MSVC is not able to link…</h3><div><p>MSVC is not able to link binaries created with different versions of the compiler (yes, I know, MS sucks, but it is up to you to move on)</p><p>If you build FreeLing with a version different than the one used to build the dependencies (boost, etc) you'll get an error.</p><p>In any case, the error you get may be caused by something else, but I can't tell without more context.  Please provide the last 10 or 15 lines output by cmake before the error.</p></div></div><p>Maryam</p><p>Fri, 02/04/2022 - 12:02</p><p>Permalink</p><div><h3>the same error</h3><div><p>Hello,</p><p>I also have the same problem with the compiler version.</p><p>I'm using VS community 2022 with MSVC 2015-2022 14.30.30708,<br> cmake-3.22.2,<br> and downloaded:<br> zlib1211 (successfully installed)<br> boost-1.61.0-x64-vs2015,<br> icu-59.1-vs2015</p><p>I built FreeLing successfully but installing failed with this error:</p><p>C:\Users\mtavak2s\Downloads\FreeLing\src\crfsuite\crfsuite\crf\train_l2sgd.c(292): warning C4101: [ 30%] Building C object src/crfsuite/CMakeFiles/crfsuite.dir/crfsuite/crf/train_lbfgs.c.obj
train_lbfgs.c
[ 31%] Building C object src/crfsuite/CMakeFiles/crfsuite.dir/crfsuite/crf/train_passive_aggressive.c.obj
train_passive_aggressive.c
[ 31%] Building CXX object src/crfsuite/CMakeFiles/crfsuite.dir/crfsuite/crfsuite_api.cpp.obj
crfsuite_api.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\yvals_core.h(581): fatal error C1189: #error: STL1001: Unexpected compiler version, expected MSVC 19.30 or newer.
NMAKE : fatal error U1077: ""C:\Program Files\cmake-3.22.2-windows-x86_64\bin\cmake.exe"": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\nmake.exe"": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\nmake.exe"": Rückgabe-Code "0x2"
Stop.

Could you please help me to fix it?

Thanks in advance
Maryam

lluisp

Mon, 02/07/2022 - 15:03

Permalink

This is some error related…

This is some error related to MSVC version. FreeLing is developed on Linux and windows ports are provided for convenience but no support is provided.

To use FreeLing on windows, the easiest way is to download a binary package, so you can avoid building it

Maryam

Mon, 02/07/2022 - 20:49

Permalink

I'd like to call FreeLing from Java

Thank you for your answer but I want to call FreeLing from java so it seems that I should build it from source to set java API.

Or is there any binary package with java API?

lluisp

Wed, 02/09/2022 - 19:36

Permalink

You are right, windows…

You are right, windows binary package does not include Java API.

The error seems related to the MSVC version... Maybe the one you use is not the same than the one used to build the dependencies.  As I said, windows ports are provided as is for users' convenience, but there is no support to solve problems about them.

My recommendation is to use Linux, even if it is the Linux Bash Shell integrated in modern windows systems
https://www.laptopmag.com/articles/use-bash-shell-windows-10

doxygen
I tried to link with MFC, change compile settings...etc but many other errors appeared...I still don't know how to convert from C to C++...beginner's problem!
Maybe I will create a dll with all the MFC functions that I'll need and I'll call them from my application.

Thanks a lot for your help.
I'm looking for help on how to draw a semi-circle in Visual C++. I'm trying to do an animation of the level changes in a spherical tank and the only way I can think of doing this is using two semi-circles but I can't draw seem to draw a semi-circle. I'd appreciate any suggestions!!Smile   [Rose]
Include windows.h.

Kuphryn
One of the files that include afx.h has a .c or similar ending (VC++ decides whether to use it's C or C++ compiler based on the file extension).

Using CString is not as easy as just #including stdafx.h - you need to link with MFC, change compile settings, etc, and get a whole lot of dependencies.

You can either use WTL[^], which comes with a perfectly compatible CString class, or "extract" the CString class from the MFC sources (again, complicated, but there#s a Macro on CodeGuru that can do that. Lost the link though...)


"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS

sighist :confused:">
thanks All!
cheers!

Ricky
In the header of class B, place

class A;

and in the header of class A, place

class B;

for example....

Copy Code

#if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class B; class A { public:
Hy John!
man, this doens't work Frown  <h3>youtube video</h3> How to fix All Microsoft Visual C++ Runtime Library Errors (100% Works)<iframe width='560' height='315' src='https://www.youtube.com/embed/WD0w3ckznGQ' frameborder='0' allowfullscreen></iframe> :confused:
http://mathworld.wolfram.com/Circle-LineIntersection.html[^]
should give you a good outline of line-circle intersection.

You could use the lowest point on your circle as the coordinate origin.
Hi
I have aproblem using SQL Command in VC++.
example:
I have an int variable and I Want to say
_T("select * from table where n= ? ")
what should I say infront of n .
for string variable I should say say something like this
'"+x+"' but for int variable I cann't do this
error c1189 visual c++ Please help me

CString strSQL;
strSQL.Format("select * from table where %d = ?", intvalue);

This should be enough.

BD
I am trying to figure out how to get the version number of Access that was used to create an MDB file.

I have a need to detect if a specified MDB file was created with Access 97, or Access 2000.

I hp 500 error code 86 01 there must be a way of detecting this, error c1189 visual c++, since Access can tell when it opens the file.

Just so you know, I am using ADO. I am not sure if I even use ADO to get this version number.

: Dean 'Karnatos' Michaud
Hy everybody!
I have a question :P Smile <div><h2>[Boost-users] boost::asio Visual Studio 8 - fatal error C1189: #error : WinSock.h has already been included</h2><div><div><div><img src=

Julian Cain

unread,
Mar 19, 2008, 2:17:55 AM3/19/08

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to error c1189 visual c++ have upgraded to VS 8.0 Standard and when compiling ASIO errors on the following:

1>Unknown compiler version - please run the configure tests and report the results
1>C:\tor\trunk\lib\boost\boost/asio/detail/socket_types.hpp(27) : fatal error C1189: #error : WinSock.h has already been included

Is this a known problem?

thanks

jc
_______________________________________________
Boost-users mailing list
[email protected]
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Julian Cain's profile photo

Julian Cain

unread,
Mar 19, 2008, 2:22:48 Hwk box auth error 1111 to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to [email protected], [email protected]

Sorry, that would be VS 9.0 (2008)
Boris's profile photo

Boris

unread,
Mar 19, 2008, 3:18:36 AM3/19/08

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission ibm t41 error 1802 delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to [email protected]

On Tue, 18 Mar 2008 error c1189 visual c++ +0100, error c1189 visual c++, Julian Cain <[email protected]> wrote:

> Sorry, that would be VS 9.0 (2008)
>
> On Tuesday, March 18, 2008, at 06:18PM, "Julian Cain" <[email protected]>
> wrote:
>> I have upgraded to VS 8.0 Standard and when compiling ASIO errors on
>> the following:
>>
>> 1>Unknown compiler version - please run the configure tests and report
>> the results
>> 1>C:\tor\trunk\lib\boost\boost/asio/detail/socket_types.hpp(27) : fatal
>> error C1189: #error : WinSock.h has already been included
>>
>> Is this a known problem?

No problem here with VC++ 2008 and Boost.Asio 0.3.9.

Boris

Andrey Tcherepanov's profile photo

Andrey Tcherepanov

unread,
Mar 19, 2008, 6:51:56 AM3/19/08

Reply to author

Sign in to assembler error invalid constant to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to [email protected]

Julian,

you might want to

#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */

before including any headers in your file. This way only winsock2.h will
be included. Or, alternatively, you can try to include winsock2.h yourself
before anything.

Have fun
Andrey.

Darren Garvey's profile photo

Darren Garvey

unread,
Mar 21, 2008, 4:13:07 AM3/21/08

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to [email protected]

Hi Julian,

On 18/03/2008, Julian Cain <[email protected]> wrote:

I have upgraded to VS 8.0 Standard and when compiling ASIO errors on the following:

1>Unknown compiler version - please run the configure tests and report win32diskimager error 123 results
1>C:\tor\trunk\lib\boost\boost/asio/detail/socket_types.hpp(27) : fatal error C1189: #error :  WinSock.h has already been included

Is this a known problem?


What do you mean by 'compiling asio'? It is a header-only library, error c1189 visual c++. :)

The problem you're seeing is because the (old) winsock.h header has been included. Most people that see this do because error c1189 visual c++ included windows.h *before* the asio headers.

You can get around this by defining WIN32_LEAN_AND_MEAN (something like that) before including windows.h, or just by including windows.h after everything else.

Regards,
Darren

[Rose]">
Include windows.h.

Kuphryn
:(">
I put:
class A;
class B : public CDialog
{
.
A objA;//just for test
}


and give's me the error:
'objA' uses undefined class 'A'
thanks!


Ricky
One of the files that include afx.h has a .c or similar ending error c1189 visual c++ decides whether to use it's C or C++ compiler based on the file extension).

Using CString is not as easy as just #including stdafx.h - you need to link with MFC, error c1189 visual c++, change compile settings, etc, and get a whole lot of dependencies.

You can either use WTL[^], which comes with a perfectly compatible CString class, or "extract" the CString class from the MFC sources (again, complicated, but there#s a Macro on CodeGuru that can do that. Lost the link though.)


"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS

sighist

Thread: Multi-threaded Debug

  1. March 2nd, 2020, 12:42 PM#1

    Multi-threaded Debug (solved)

    I have a SDI MFC test app. I setup this project as /MTd, error c1189 visual c++. Compiled and tested, everything is ok. And I included a external library, which is compiled as /MTd. I generated again the settings of the project with CMake to has every external libs and headers file. And when I compiled again the MFC project, tell me this:

    Code:

    1>MainFrm.cpp 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\include\afxver_.h(77): fatal error C1189: fight against terrorism in kazakhstan Please use the /MD switch for _AFXDLL builds 1>DDD.cpp 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\include\afxver_.h(77): fatal error C1189: #error: Please use the /MD switch for _AFXDLL builds 1>DDDDoc.cpp 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\include\afxver_.h(77): fatal error C1189: #error: Please use the /MD switch for _AFXDLL builds 1>DDDView.cpp 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\include\afxver_.h(77): fatal error C1189: #error: Please use the /MD switch for _AFXDLL builds 1>stdafx.cpp 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\include\afxver_.h(77): fatal error C1189: #error: Please use the /MD switch for _AFXDLL builds 1>Generating Code. 1>Done building project "DDD.vcxproj" -- FAILED.
    tell me that I should set the project as /MD. But I cannot do this due to external library which, I said before, is already compiled as MT .

    What should I do to solve my problem ?
    Last edited by mesajflaviu; March 3rd, 2020 at 02:18 AM.

  2. Re: Multi-threaded Debug

    Victor Nijegorodov

  3. March 3rd, 2020, 02:18 AM#3

    Re: Multi-threaded Debug

    Yes, it solved my problem Thank you Victor !!

    P.S. Of course, I have seek myself for a solution, and I applied what I've found, but none of them had worked.
    Last edited by mesajflaviu; March 4th, 2020 at 03:46 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Forum Rules




Are you still including the .h file for the class?
No, I remove it

Ricky
You will need to retain the .h includes as well as the
declaration of the class.

Or, you can see Rage's post below. Both methods should work.