• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
clang can not compile simple cpp file with main's second argument is typedef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

clang can not compile simple cpp file with main's second argument is typedef


  • Subject: clang can not compile simple cpp file with main's second argument is typedef
  • From: Dmitry Markman <email@hidden>
  • Date: Fri, 25 Jan 2013 22:37:28 -0500

Hi all

clang++ failed to compile the following simple program

I have Xcode 4.5.2 installed
clang++ --version returns

Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix





#include <iostream>

typedef char char_T;

int main(int argc, const char_T * argv[])
{
        std::cout << "Hello Test World!" << std::endl;
        return 0;
}


it complained
dima_test.cpp:5:5: error: second parameter of 'main' (argument array) must be of type 'char **'
int main(int argc, const char_T * argv[])

as far as I can see second argument is char**

gcc-4.7.1 (I built it by myself) is fine with that

am I missing something here?

thanks


Dmitry Markman


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: clang can not compile simple cpp file with main's second argument is typedef
      • From: Dmitry Markman <email@hidden>
    • Re: clang can not compile simple cpp file with main's second argument is typedef
      • From: Aaron Montgomery <email@hidden>
  • Prev by Date: Encrypting NIBs and StoryBoards
  • Next by Date: Re: clang can not compile simple cpp file with main's second argument is typedef
  • Previous by thread: Re: Encrypting NIBs and StoryBoards
  • Next by thread: Re: clang can not compile simple cpp file with main's second argument is typedef
  • Index(es):
    • Date
    • Thread