[Linker error] undefined reference to 'WinMain@16' - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

[Linker error] undefined reference to 'WinMain@16'

kc2keokc2keo Posts: 110Member
First of all I am working on the helloworld example with jni. I am using BloodShed dev c++ for my compiler. I have downloaded jni.h, jnipost.h from searching at google.com and putting them in the #include directory. Everything seems to go fine execpt for the error which is the name of this thread. I made the header stub from my helloworld java file and also put it in the include directory which is in my compiler root directory. I am also aware that some of the code generated in the header file has to be the same in the .c file. I hope i'm explaining this right.

Anyway heres the link to the tutorial:


After I make the native code implementation i'll have to make the shared library and i'm also not sure how to. I know I have the option to make one in my compiler but I don't know what to do from there.

Any help would be great,

Thanks in advance,
George Mouyios


Sign In or Register to comment.