X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.9 required=5.0 tests=BAYES_40,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Message-ID: <29068199.post@talk.nabble.com> Date: Sun, 4 Jul 2010 03:24:52 -0700 (PDT) From: "kenny AT ca" To: cygwin AT cygwin DOT com Subject: Building DLLs on C++ version code failed, but okay on C version code. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi there, I wrote a file, hello.c. It has only one function: print a message like "hello!". ##### hello.c ######### #include void hello() { printf( "Hello.\n" ) ; } $gcc -c hello.c $gcc -shared -o hello.dll hello.o I successufully built it as DLL, hello.dll. Then, I rewrote it in c++. ##### hello.cpp ####### #include using namespace std ; void hello() {cout << "Hello." << endl ;} Then, I used the commands above to built DLL, but it failed. Why did it fail? -- View this message in context: http://old.nabble.com/Building-DLLs-on-C%2B%2B-version-code-failed%2C-but-okay-on-C-version-code.-tp29068199p29068199.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple