[완료] Visual Studio 2005로 작업하면서 순수하게 Win32 API만 사용해도 배포가 불편합니다.

tinywolf의 이미지

Visual Studio 2005로 MFC나 기타 다른 라이브러리는 전혀 사용하지 않고
순수하게 Win32 API만 사용해서 프로그램을 만들었습니다.
그런데 다른 윈도우즈로 가져가서 실행해보면 뭐가 안 맞다고 실행이 안되네요.

그래서 검색해보니 'Visual Studio 2005 런타임 라이브러리 재배포 패키지'를 같이 배포해야한다.
라고 하던데요..

이건 뭐, 실제 프로그램은 20KB밖에 안되는데 2.6MB에 달하는 설치파일을 같이 보내야 한다니..
게다가 실제로 설치해보니 설치 시간도 만만치 않더군요..
받는 쪽에게 왜 이렇게 하는 일에 비해 덩치가 큰지 설명하기도 난감하고..

Visual Studio 6.0에서는 순수하게 API로만 만들면
별다르게 같이 복사할 라이브러리는 없었던 것같은데..
VS2005는 왜 이럴까요?
무언가 방법이 없을까요?

noblepylon의 이미지

정적링크를 하면 되지 않을까하는 추측입니다.
다만 이렇게 되면 실행파일자체가 2.3MB가량으로 늘어나겠지요.
---
“내게 능력주시는 자 안에서 내가 모든 것을 할 수 있느니라.”(빌립보서 4:13)

---
“내게 능력주시는 자 안에서 내가 모든 것을 할 수 있느니라.”(빌립보서 4:13)

chadr의 이미지

순수 win32api만 사용해도 기본적으로 프로그램이 돌아갈려면 crt라이브러리가 필요하기 때문입니다.
crt 라이브러리도 비주얼 스튜디오 개발툴 마다 버전이 다르기 때문에 어쩔수가 없습니다.

6.0의 경우에는 아무런 배포가 없이 됬던건 os설치시 이런 것들이 다 같이 설치가 되었기 때문이지요. :)

http://www.serious-code.net/moin.cgi/RedistributingVisualCppRunTimeLibrary

이 주소에서

Private Assembly 섹션을 참고하시면 됩니다.

참고로 2005부터는 dll배포방식이 바뀌어서 6.0과 같이 dll만 같이 복사해서 넣어도 동작하지 않습니다.

저 주소에 있는 manifest파일을 반드시 같이 배포를 해주어야하니 이 점 유의하시면 됩니다.

정적링크를 하나 설치파일을 같이 배포하나 위의 주소에서 dll을 같이 배포하나 용량에서는 거의 차이는 없지만
설치가 필요 없이 그냥 배포만 하면 되므로 편하실 겁니다.
-------------------------------------------------------------------------------
It's better to appear stupid and ask question than to be silent and remain stupid.

-------------------------------------------------------------------------------
It's better to appear stupid and ask question than to be silent and remain stupid.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.