wxWidgets statisch linken mit g++
-
wx-config ist ein skript welches die ganzen flags auf der kommandozeile ausgibt. Da es ein Shell-Skript ist braucht man aber MSYS welches eine Art Portierung der Shell für Windows ist. MSYS gibts unter mingw.org . Dort ist der Link zur Sourceforge Seite.
-
Und wie habe ich mir diese Flags vorzustellen?
(schon Wikipedia gefragt, aber nicht draus schlau geworden)
-
naja im grunde sind da nur die ganzen include und lib pfade angegeben und die benötigten libs selbst das wären also alle von wxWidgets und die von der winapi. Das schwierige ist das die auch noch in einer ganz bestimmten reihenfolge sein müssen.
-
Also,
g++ 'wx-config --cxx --cppflags' params.cpp -o params.exe `wx-config --static=yes --libs`
ergibt
g++: extraneous argument to--static' option g++: 'wx-config: No such file or directory g++:
wx-config: No such file or directory
cc1plus.exe: error: unrecognized command line option "-fcxx"
cc1plus.exe: error: unrecognized command line option "-fcppflags'"
cc1plus.exe: error: unrecognized command line option "-flibs`"Edit: Ich hab grad wx-config in meinem directory installiert, aber immer noch dasselbe.
-
das erste wx-config muss auch in den `` klammern stehen
-
player4245 schrieb:
das erste wx-config muss auch in den `` klammern stehen
Hä?? Tut es doch, oder sehe ich was falsch?
-
also in deinem beispiel tut es das nicht
-
Soll ich schreiben
'wx-config' --cpp --cxxflags
oder was?
Übrigens scheint gcc doppelte Minusse generell nicht zu leiden, er wandelt sie immer in -f um
-
also so gehts auch nicht:
g++ ''wx-config' --cxx --cppflags' params.cpp -o params.exe ''wx-config' --static=yes --libs'
-
nein du musst schreiben:
g++ quelldatei.cpp `wx-config --libs --cxxflags` -o target
diese klammern sind neben der ß-Taste (shift drücken).
-
g++:
wx-config: No such file or directory cc1plus.exe: error: unrecognized command line option "-flibs" cc1plus.exe: error: unrecognized command line option "-fcxxflags
"?? obwohl ich die Umgebungsvariable schon gesetzt habe und wx-config im selben ordner liegt
-
g++ params.cpp
[Mein\\Pfad\\]wx-config --static=yes --libs --cxxflags
-o params
g++: extraneous argument to--static' option g++:
D:\David\Desktop\wx-config: Invalid argument
cc1plus.exe: error: unrecognized command line option "-flibs"
cc1plus.exe: error: unrecognized command line option "-fcxxflags`"
-
du musst wx-config im selben ordner ausführen oder den absoluten pfad angeben
g++ quell.cpp `C:\wxwidgets\wx-config --libs --cxxflags` -o target
-
Hab ich beides probiert, geht nicht.
-
bist du mit der konsole in den wxwidgets ordner gegangen und hast mal wx-config eingegeben?
-
C:\wxWidgets-2.8.10>g++ D:\blah\params.cpp
wx-config --static=yes --libs --cxxflags' -o D:\\blah\\params.exe g++: extraneous argument to
--static' option
g++: `wx-config: No such file or directory
cc1plus.exe: error: unrecognized command line option "-flibs"
cc1plus.exe: error: unrecognized command line option "-fcxxflags'"
-
die letzte klammer muss auch ` sein du hast '
-
mit Klammer genau dasselbe
-
Er findet ja nicht einmal wx-config...
obwohl ich eine wx-config.in-Datei hab
-
nein die datei muss nur wx-config heissen - ohne endung