This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Does anybody use G++ on Windows to make DLLs?


Hello.

I'm trying to create a DLL:

--------------/HelloWorld.cpp/------
#include <jni.h>
#include "HelloWorld.h"
#include <stdio.h>

JNIEXPORT void JNICALL 
Java_HelloWorld_displayMessage(JNIEnv *env, jobject obj) 
{
    printf("Hello world!\n");
    return;
}

And if I try:
g++.exe HelloWorldImp.dll "HelloWorld.o" -L"d:\Dev-C++\lib"
-I"d:\Dev-C++\include"  -I"D:\j2sdk\include"
-I"D:\j2sdk\include\win32"  -I"d:\Dev-C++\include\g++-3"
-I"d:\Dev-C++\include" 

I get this error message:

d:\Dev-C++\lib/libmingw32.a(main.o)(.text+0x8d):main.c:
undefined reference to `WinMain@16'

Any experience?
--------------------------------------------------------------------------------------------------------
¿Conoces eBay, el mayor centro de compra y venta en internet?
Móviles, portátiles, pda´s, cd´s, cámaras digitales, videocamaras...

¡Compra ahora a los mejores precios! http://ebay.hispavista.com
------------------------------------------------------------------------------------------------------

¿Sabes si está libre tu dominio .info/.biz/.com/.org/.net/.es?
¿Quieres tener tu propio dominio y redirigirlo a tu espacio web
en Galeon.com por 3,01 euros/mes?

Gestiona tu dominio desde http://www.galeon.com
------------------------------------------------------------------------------------------------------

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]