안녕하세여 세내기 입니다.유닉스를 배워서 리눅스를 vmware로깔아서 사용중인데요 컴파일이.

killname의 이미지

c로 할떈 이상없던 컴파일이 리눅스 터미널에서

gcc 를 이용하면 컴파일이 되지 않습니다.

혹시 c랑은 다른것이라서 컴파일이 되지 않는 경우가 있는겁니까..?

유닉스 c는 윈도우 사용되는 c랑 컴파일 구조가 다른거가요.그리고 궁금한게 아직 많은데요.ㅎㅎ

인터넷 연결 설정에 대해서 아시는분 있나요.아무리 해봐도 되지가 않네요.네이트온 등록 해주시면 감사해요.ㅠ devilkillkoll@hanmail.net

그리구 strtok함수에 대해서도 공부하는중인데 아시는분 있으면 친추점 해주세요 좋은하루되세요^^; 답변점 꼭 부탁해요.

freestyle의 이미지

c로 할 땐 이상없던 컴파일이라뇨...

VS같은 컴파일러로 컴파일했을 때는 잘 수행되었지만,
gcc 컴파일러로 컴파일했을 때는 에러가 발생했다는 거 같은데요...

c언어의 표준이 존재하므로, 올바른 컴파일러는 그 표준을 모두 지켜야겠지만
실제로 그렇지 않기도 하고, 특정 시스템에서만 사용되는 라이브러리일 경우
다른 시스템에서는 해석하지 못합니다.

하지만 지금 하시는 게 기초적인 프로그래밍이라면 당분간은 그런 걱정 없이
공부할 수 있을텐데요.

뭔가 설정 문제일 가능성이 높습니다.

프로그램 소스와 실행과정과 에러 내용을 구체적으로 올려주세요.

-----------------------------
Go to the U-City

----------------------------------------------------------------------------------------
Don't Feed the Trolls!
----------------------------------------------------------------------------------------

mengguo의 이미지

물론 다르죠. window에서 실행한것 같은데요. window와 Linux는 플랫폼이 많이 다르니 lib가 달라 컴파일러도 다르죠. gcc와 윈도우용 c컴파일러는 많이 다릅니다.

#include <string.h> 
 
char *strtok(char *s, const char *delim); 
char *strtok_r(char *s, const char *delim, char **ptrptr);

파라메터 s에서 delim의 문자를 포함하지않는 문자열, 즉 토큰을 순서대로 얻어내는 함수예요.
많이 쓰이는 재미있는 함수죠.

여기 를 참조하세요.

화이팅. 블론드

많이 배울께요~V_V 내가 알면 배워두 주구요~~ 웬걸~Q_Q

댓글 달기

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