[Issue] wxStrcoll: Identifier not found Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Yazza
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Oct 24, 2018 5:55 pm

[Issue] wxStrcoll: Identifier not found

Post by Yazza » Wed Oct 24, 2018 6:09 pm

Hello Everyone !!

I'm totally new in the universe of CPP, and I have an issue for my first application.
I downloaded the 3.0.4 version of WxWidgets, and I built it with Visual Studio 2017.
My configuration was : Debug, Win32, MBCS (Non-Unicode)

The build hadn't failed, so I started my first application, following samples on the wiki.
I also added an environment variable for the path, and used it in the Properties sheets for my application.
I also added PreProcessor Definitions required :

Code: Select all

WIN32
_WINDOWS
WINVER=0x0400
__WXMSW__
wxUSE_GUI=1
_DEBUG
__WXDEBUG__
_CRT_SECURE_NO_DEPRECATE
_CRT_NONSTDC_NO_DEPRECATE
When I try to build, I don't understand the issue I have, it said :

Code: Select all

Error	C3861	'wxStrcoll': identifier not found
Error	C3861	'wxStrcoll': identifier not found
I don't use this class, there is MyApp.cpp :

Code: Select all

#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

#include "MyApp.h"
#include "MyFrame.h"


bool MyApp::OnInit() {
	MyFrame *frame = new MyFrame("Hello World", wxPoint(50, 50), wxSize(450, 350));
	frame->Show(true);
	return true;
};

wxIMPLEMENT_APP(MyApp);
Where am I wrong ? Im a bit confused, I think I don't understand something important...
Thx to people who will help me, I can give more information

PB
Part Of The Furniture
Part Of The Furniture
Posts: 1883
Joined: Sun Jan 03, 2010 5:45 pm

Re: [Issue] wxStrcoll: Identifier not found

Post by PB » Wed Oct 24, 2018 6:55 pm

Did you try what is described here (the first match when you search for wxstrcoll on the forum)?

I would also strongly advise against using MBCS and to use Unicode instead.

Yazza
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Oct 24, 2018 5:55 pm

Re: [Issue] wxStrcoll: Identifier not found

Post by Yazza » Thu Oct 25, 2018 7:29 am

Thx for the answer !

I switched to 3.1.1 finally. It worked for people on the link you gave me.
I have an other issue, now :
Error C2065 'WS_EX_LAYOUTRTL': undeclared identifier
I followed this link :
viewtopic.php?f=19&t=42050&p=170165&hil ... _LAYOUTRTL

When I change or delete WINVER, the linker is looking for wxmsw28d_core.lib, but it should link to wxmsw31ud_core.lib because I added "_UNICODE" and "UNICODE", and I set Character Set of the project, am I right ?

People say it could be a problem from include order, there are my includes :

Code: Select all

MyApp.cpp
#include "MyApp.h"
#include "MyFrame.h"

MyApp.h
#pragma once
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

MyFrame.cpp
#include "MyFrame.h"

MyFrape.h
#pragma once
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
I'm new in CPP development, maybe I do a newby mistake (for sure) but I cant see any problem with includes, I have only 2 Classes :?

Yazza
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Oct 24, 2018 5:55 pm

Re: [Issue] wxStrcoll: Identifier not found

Post by Yazza » Thu Oct 25, 2018 7:54 am

Okay I resolved it !! Like I said, I was doing a newby mistake...
My Preprocessor wasn't good, I used preprocessor in the install.txt
__WXMSW__;_UNICODE
And it was looking for the wrong librairies because of my Input Linker configuration. Now :
wxmsw31ud_core.lib;wxbase31ud.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;%(AdditionalDependencies)
And it's working !!
I think I understand a bit what I am doing, but the journey goes on.
See you next time, and hope it will help newbies like me.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 1883
Joined: Sun Jan 03, 2010 5:45 pm

Re: [Issue] wxStrcoll: Identifier not found

Post by PB » Thu Oct 25, 2018 9:10 am

JFYI: with MSVC, you do not need to specify the individual libraries to link with, see the second bullet in the install instructions:
https://github.com/wxWidgets/wxWidgets/ ... build_apps

Post Reply