Hello,
I'm trying to build a very simple program with only a single frame with static library. Everything is fine with manual build. Here are the build commands i use.
g++ -c -o main.o -mthreads -D__WXMSW__ -D_UNICODE -O2 main.cpp
windres -ixYGx.rc -oxYGx.o --define __WXMSW__ --define _UNICODE
g++ -o xYGxHelper.exe main.o xYGx.o -mthreads -mwindows -lwxmsw27u_core -lwxbase27u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
But after put the project in C:B workspace and config the options. I get these errors.
obj\Release\main.o(.text+0x17b):main.cpp: undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
obj\Release\main.o(.text+0x1a3):main.cpp: undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
obj\Release\main.o(.text+0x3ba):main.cpp: undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
obj\Release\main.o(.text+0x672):main.cpp: undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
obj\Release\main.o(.text+0x693):main.cpp: undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
obj\Release\main.o(.rdata$_ZTV10xYGxHelper[vtable for xYGxHelper]+0x44):main.cpp: undefined reference to `wxApp::Initialize(int&, char**)'
Please check my build configuration if there is something i'm missing.
Compile flag: -Wall -O2 -s
Other options: -mthreads -mwindows
Define:
__WXMSW__
_UNICODE
linking options (sort by order):
-mthreads
-Wl,--subsystem,windows
-mwindows
-lwxmsw27u_core
-lwxbase27u
-lwxtiff
-lwxjpeg
-lwxpng
-lwxzlib
-lwxregexu
-lwxexpat
-lkernel32
-luser32
-lgdi32
-lcomdlg32
-lwinspool
-lwinmm
-lshell32
-lcomctl32
-lole32
-loleaut32
-luuid
-lrpcrt4
-ladvapi32
-lwsock32
-lodbc32
Thank you