Problem to connect Compile Instruction

Dear Community,
I have a little Problem to connect Compiler Instructions for g++ on Linux Ubuntu Mint.
The Problem is that I can combine not following instructions.:
I Have to compile wx-widgets per:
g++ test.cpp `wx-config --libs --cxxflags` -std=c++11 -o Test2
And to compile libpq4 per:
g++ test.cpp -lpqxx -lpq -o Test2
together.
And I can not imagine me how this should be written.
My version are:
g++ test.cpp `wx-config --libs --cxxflags` -std=c++11 -lpqxx -lpq -o Test2
And this wouldn't work.
Anybody a Imagination how to solve this.???

P.S.: I knew is a little bit tricky question. But I'm a crazy person.
Last edited on
More info than "it wouldn't work" might be helpful.
Try
g++ -std=c++11 -o Test2 $(wx-config --cxxflags) test.cpp $(wx-config --libs) -lpqxx -lpq 

Topic archived. No new replies allowed.