X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Message-ID: <769164.44389.qm@web25502.mail.ukl.yahoo.com> Date: Sun, 4 Jul 2010 11:15:43 +0000 (GMT) From: Marco Atzeri Subject: R: Building DLLs on C++ version code failed, but okay on C version code. To: cygwin AT cygwin DOT com In-Reply-To: <29068199.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 --- Dom 4/7/10, kenny AT ca ha scritto: >=20 > Hi there, >=20 > I wrote a file, hello.c. It has only one function: print a > message like > "hello!".=20 > ##### hello.c ######### > #include > void hello() { printf( "Hello.\n" ) ; } >=20 > $gcc -c hello.c > $gcc -shared -o hello.dll hello.o >=20 > I successufully built it as DLL, hello.dll. >=20 > Then, I rewrote it in c++. > ##### hello.cpp ####### > #include > using namespace std ; > void hello() {cout << "Hello." << endl ;} >=20 > Then, I used the commands above to built DLL, but it > failed. Why did it > fail? wrong compiler ?=20 For C++ you need a C++ compiler $g++ -c hello.cpp $g++ -shared -o hello.dll hello.o Marco PS: this is not a cygwin issue, it is a "very" basic one. =20 -- 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