wxWindows 설정 문제

FlOw의 이미지

크로스 플랫폼 GUI를 배워보고자 wxWidgets를 설치하려고 했습니다.(어느새 이름이 바꿨네요wxWidgets로..)
플랫폼은 XP 이고 MinGW를 사용하려 합니다.
설치를 하고 설정을 해야 하는 것 같은데 도저히 모르겠습니다. 도와주세요.. ㅠㅠ

#include <iostream>
#include <wx/wx.h>
using namespace std;
int main(){
    cout << "Hello World\n";
    return(0);
}

g++ -g -Wall -o wxexam.exe wxexam.cpp -I"D:/Program Files/wxWidgets-2.6.1/include"
In file included from D:/Program Files/wxWidgets-2.6.1/include/wx/defs.h:21,
                 from D:/Program Files/wxWidgets-2.6.1/include/wx/wx.h:15,
                 from wxexam.cpp:2:
D:/Program Files/wxWidgets-2.6.1/include/wx/platform.h:260:22: wx/setup.h: No such file or directory
In file included from D:/Program Files/wxWidgets-2.6.1/include/wx/platform.h:263,
                 from D:/Program Files/wxWidgets-2.6.1/include/wx/defs.h:21,
                 from D:/Program Files/wxWidgets-2.6.1/include/wx/wx.h:15,
                 from wxexam.cpp:2:
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:84:9: #error "wxUSE_DYNLIB_CLASS must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:100:9: #error "wxUSE_FILESYSTEM must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:113:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:121:9: #error "wxUSE_LOG must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:129:9: #error "wxUSE_LONGLONG must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:137:9: #error "wxUSE_MIMETYPE must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:153:9: #error "wxUSE_PROTOCOL must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:195:9: #error "wxUSE_REGEX must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:203:9: #error "wxUSE_STDPATHS must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:211:9: #error "wxUSE_XML must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:219:9: #error "wxUSE_SOCKETS must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:227:9: #error "wxUSE_STREAMS must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:235:9: #error "wxUSE_STOPWATCH must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:243:9: #error "wxUSE_TEXTBUFFER must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:251:9: #error "wxUSE_TEXTFILE must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:259:9: #error "wxUSE_UNICODE must be defined."
D:/Program Files/wxWidgets-2.6.1/include/wx/chkconf.h:267:9: #error "wxUSE_URL must be defined."

구글신께 물어보아도 내공부족으로 이해를 못하겠어요.. 헬..프.. ㅜㅠ
File attachments: 
첨부파일 크기
Image icon dev-cpp.jpg353.3 KB
codebank의 이미지

죄송합니다. 설치 활용보다는 프로그램쪽 문제 같아서 게시물을 옮겼습니다.

일단 원인을보면 wx/wx.h의 15번째부터 무언가 잘못되었다는 신호를 보내고
있네요. 결국 에러의 원인은 wx.h:15, defs.h:21, platform.h:263 으로 압축이
되는데 platform.h의 263라인은 무엇인지가 궁금해지네요.
(제가 MinGW를 사용하지 않아서요.)

제가 알고있는 해결방법( ? )은 한가지 모든 설정을 지정하는 방법입니다.
즉, 컴파일 옵션에 -I"C:/mingw/include" -I"C:/mingw/include/c++" ...
을 붙여서 컴파일하는 방법이죠.
물론 command라인에 다쓰는게 어렵고 오타도 발생할 수가 있으니 Makefile로
만들어서 컴파일을 하기도 합니다만...

어쨌든 제가 아는 방법은 저방법밖에는 없습니다. 보통은 다른분들이 만들어놓은
소스를 참조해서 컴파일을 합니다. :)

---------------
검색을 해보니
http://codeblocks.sourceforge.net/wiki/index.php/Compiling_wxWidgets_2.4.2_to_develop_Code::Blocks_(MSW)
이런글이 있더군요.
페이지의 마지막에 컴파일과 링크시에 필요한 디렉토리가 있습니다. 그것을 첨가
시켜서 컴파일해보세요.
cygwin을 사용하지 않아도된다면
http://www.wxwidgets.org/devcpp.htm
이부분을 참고하셔도 좋을듯합니다. DEV-C++이라는 컴파일러툴인데 저도 가끔씩
사용을 하고 있죠.(편집기는 아주 많이 불편하지만... :))

------------------------------
좋은 하루 되세요.

elecguy의 이미지

wxWidgets 은 소스형태로 배포되기 때문에 컴파일해서 라이브러리를 생성한 후 사용해야 합니다.
시작->프로그램->wxWidgets ??->Compiling wxWidgets 문서의 mingw/cygwin 부분을 참조하면 됩니다.
그리고, wxWidgets 가 설치폴더아래의 samples 폴더의 makefile.gcc 를 참조하여 Makefile 를 만들면 됩니다.
설정사항이 복잡하기 때문에 컴맨드라인에서 힘들겁니다.
그럼.

폐인, 노가다 그 끝은..?

FlOw의 이미지

codebank님, elecguy님 감사합니다.
일단 제 잘못이 크네요 ㅠㅠ 라이브러리를 컴파일을 해야되는 것이었어요.
오늘 다시 setup.h을 복사해서 넣고 컴파일 하니까 링킹이 안되길레, 디렉토리를 보니까 라이브러리 폴더가 비어있더군요. orn

UnxUtils 를 설치하고 path를 걸었는데, 컴파일 할때 이것때문에 체크하는 부분에서 에러 납니다. 그래서 path에서 없애고 mingw32-make 실행 했습니다. (user 이름도 바꿔보고, 다시 설치도 해보고 무한 삽질 ㅡㅡ; )

http://codeblocks.sourceforge.net/wiki/index.php/Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29
여기 나온데로 완료했습니다(codebank님 감사^^) ... 만 링킹이 안되네요.. "cannot find -lwxmsw26d_core" 라고 나오는데 라이브러리 이름이 조금다른것같고.. 일단 make 를 먼저 공부해야 겠습니다. 수많은 옵션의 압박을 견딜수 없어요 8)
감사합니다.

-------------------- 절취선 --
행복하세요:)

FlOw의 이미지

dev-c++ 의 Update 모드로 설치해버렸습니다.(음.. 편합니다)
dev-c++ 를 애용 해야 겠네요.
이 화면 보려고 고생을;;;

댓글 첨부 파일: 
첨부파일 크기
Image icon 0바이트

-------------------- 절취선 --
행복하세요:)

codebank의 이미지

아~ 해결 하셨군요. :)

(모로가도 부산만가면 되니까요. :twisted: )

------------------------------
좋은 하루 되세요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.