Solved

generate DLL using cygwin or MinGW

Posted on 2014-02-15
7
1,106 Views
Last Modified: 2014-02-17
I am making "dll" using JNI as suggested in SWIG.
I am getting weird error when I try to generate dll using Cygwin.

cygwin way
C:\Cplusplus\swigwin-2.0.11>gcc -shared example.o  example_wrap.o -mno -cygwin -
Wl,--add-stdcall-alias  -o example.dll
gcc: error: unrecognized command line option '-mno'
gcc: error: unrecognized command line option '-cygwin'

Open in new window



MinGW way
C:\Cplusplus\swigwin-2.0.11>gcc -shared example_wrap.o -L/local/lib/ -ltcl84 -o
example.dll
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot fin
d -ltcl84
collect2.exe: error: ld returned 1 exit status

Open in new window

0
Comment
Question by:jgdvishnu
  • 5
  • 2
7 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 39862233
Well, I don't know about '-mno', but '-cygwin' seems to be more than redundant as a compiler option - try building the module omitting the two of them.

As fas as for teh 2nd snippet, are you sure that there is a 'libtcl84*' in your library search path? Try

find /usr/lib -name "libtcl84*" -print

Open in new window

to find out about that.
0
 

Author Comment

by:jgdvishnu
ID: 39862320
Thanks I am getting a strange error now...


C:\Cplusplus\swigwin-2.0.11>gcc -shared example.o  example_wrap.o -Wl,--add-stdcall-alias  -o example.dll
example_wrap.o:example_wrap.c:(.text+0x91b): undefined reference to `_imp__Tcl_ResetResult'
example_wrap.o:example_wrap.c:(.text+0x92f): undefined reference to `_imp__Tcl_SetObjResult'
example_wrap.o:example_wrap.c:(.text+0x953): undefined reference to `_imp__Tcl_SetErrorCode'
example_wrap.o:example_wrap.c:(.text+0x968): undefined reference to `_imp__Tcl_ResetResult'
example_wrap.o:example_wrap.c:(.text+0x98c): undefined reference to `_imp__Tcl_SetErrorCode'
example_wrap.o:example_wrap.c:(.text+0x9b7): undefined reference to `_imp__Tcl_AppendResult'
example_wrap.o:example_wrap.c:(.text+0x9d4): undefined reference to `_imp__Tcl_NewStringObj'
example_wrap.o:example_wrap.c:(.text+0x9fc): undefined reference to `_imp__Tcl_ObjSetVar2'
example_wrap.o:example_wrap.c:(.text+0xa88): undefined reference to `_imp__Tcl_InitHashTable'
example_wrap.o:example_wrap.c:(.text+0xb32): undefined reference to `_imp__Tcl_DeleteHashEntry'
example_wrap.o:example_wrap.c:(.text+0xbb1): undefined reference to `_imp__Tcl_VarEval'
example_wrap.o:example_wrap.c:(.text+0xbc2): undefined reference to `_imp__Tcl_GetObjResult'
example_wrap.o:example_wrap.c:(.text+0xbda): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0xbee): undefined reference to `_imp__Tcl_ResetResult'
example_wrap.o:example_wrap.c:(.text+0xc1c): undefined reference to `_imp__Tcl_VarEval'
example_wrap.o:example_wrap.c:(.text+0xc2f): undefined reference to `_imp__Tcl_ResetResult'
example_wrap.o:example_wrap.c:(.text+0xc46): undefined reference to `_imp__Tcl_ResetResult'
example_wrap.o:example_wrap.c:(.text+0xc5d): undefined reference to `_imp__Tcl_GetObjResult'
example_wrap.o:example_wrap.c:(.text+0xc6f): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0xd5d): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0xdf3): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0xef9): undefined reference to `_imp__Tcl_NewStringObj'
example_wrap.o:example_wrap.c:(.text+0xf8f): undefined reference to `_imp__Tcl_NewStringObj'
example_wrap.o:example_wrap.c:(.text+0xfc2): undefined reference to `_imp__Tcl_GetVar'
example_wrap.o:example_wrap.c:(.text+0x1040): undefined reference to `_imp__Tcl_SetVar'
example_wrap.o:example_wrap.c:(.text+0x10bc): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x110f): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1133): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x11e0): undefined reference to `_imp__Tcl_DeleteCommandFromToken'
example_wrap.o:example_wrap.c:(.text+0x13f8): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x143e): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1462): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x151c): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x1561): undefined reference to `_imp__Tcl_DuplicateObj'
example_wrap.o:example_wrap.c:(.text+0x1572): undefined reference to `_imp__Tcl_SetObjResult'
example_wrap.o:example_wrap.c:(.text+0x15c6): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x15e5): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x162d): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1666): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x174f): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x17bc): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x17fa): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1821): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1851): undefined reference to `_imp__Tcl_GetStringResult'
example_wrap.o:example_wrap.c:(.text+0x18ea): undefined reference to `_imp__Tcl_AppendElement'
example_wrap.o:example_wrap.c:(.text+0x1988): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x19a6): undefined reference to `_imp__Tcl_GetCommandInfo'
example_wrap.o:example_wrap.c:(.text+0x19d0): undefined reference to `_imp__Tcl_DuplicateObj'
example_wrap.o:example_wrap.c:(.text+0x1a14): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1a3c): undefined reference to `_imp__Tcl_CreateObjCommand'
example_wrap.o:example_wrap.c:(.text+0x1abf): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1af6): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1b7e): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1c0b): undefined reference to `_imp__Tcl_GetObjResult'
example_wrap.o:example_wrap.c:(.text+0x1c15): undefined reference to `_imp__Tcl_DuplicateObj'
example_wrap.o:example_wrap.c:(.text+0x1c33): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1c70): undefined reference to `_imp__Tcl_DuplicateObj'
example_wrap.o:example_wrap.c:(.text+0x1c8e): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1cb0): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1cd7): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1d3b): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x1dc0): undefined reference to `_imp__Tcl_CreateObjCommand'
example_wrap.o:example_wrap.c:(.text+0x1e3c): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1e9e): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1f18): undefined reference to `_imp__Tcl_GetLongFromObj'
example_wrap.o:example_wrap.c:(.text+0x1fc1): undefined reference to `_imp__Tcl_GetDoubleFromObj'
example_wrap.o:example_wrap.c:(.text+0x2043): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x2066): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x2082): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x2145): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x21d8): undefined reference to `_imp__Tcl_AppendResult'
example_wrap.o:example_wrap.c:(.text+0x2201): undefined reference to `_imp__Tcl_GetDoubleFromObj'
example_wrap.o:example_wrap.c:(.text+0x2243): undefined reference to `_imp__Tcl_GetLongFromObj'
example_wrap.o:example_wrap.c:(.text+0x22b1): undefined reference to `_imp__Tcl_NewIntObj'
example_wrap.o:example_wrap.c:(.text+0x22e9): undefined reference to `_imp__Tcl_NewStringObj'
example_wrap.o:example_wrap.c:(.text+0x233e): undefined reference to `_imp__Tcl_NewDoubleObj'
example_wrap.o:example_wrap.c:(.text+0x235c): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x2382): undefined reference to `_imp__Tcl_SetVar2'
example_wrap.o:example_wrap.c:(.text+0x23ab): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x23db): undefined reference to `_imp__Tcl_NewStringObj'
example_wrap.o:example_wrap.c:(.text+0x2401): undefined reference to `_imp__Tcl_ObjGetVar2'
example_wrap.o:example_wrap.c:(.text+0x242d): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x2567): undefined reference to `_imp__Tcl_SetObjResult'
example_wrap.o:example_wrap.c:(.text+0x26b4): undefined reference to `_imp__Tcl_SetObjResult'
example_wrap.o:example_wrap.c:(.text+0x2721): undefined reference to `_imp__Tcl_SetObjResult'
example_wrap.o:example_wrap.c:(.text+0x2a7d): undefined reference to `_imp__Tcl_InitHashTable'
example_wrap.o:example_wrap.c:(.text+0x2bd8): undefined reference to `_imp__Tcl_InitHashTable'
example_wrap.o:example_wrap.c:(.text+0x2c72): undefined reference to `_imp__Tcl_PkgProvide'
example_wrap.o:example_wrap.c:(.text+0x2ce7): undefined reference to `_imp__Tcl_CreateObjCommand'
example_wrap.o:example_wrap.c:(.text+0x2d3c): undefined reference to `_imp__Tcl_SetVar'
example_wrap.o:example_wrap.c:(.text+0x2d86): undefined reference to `_imp__Tcl_TraceVar'
example_wrap.o:example_wrap.c:(.text+0x2dd0): undefined reference to `_imp__Tcl_TraceVar'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: example_wrap.o: bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status

C:\Cplusplus\swigwin-2.0.11>

Open in new window



and on Cygwin editor I get

vbhagat@USTP2NB29224 ~
$ gcc -shared example.o  example_wrap.o -Wl,  -o example.dll
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find : Invalid argument
collect2.exe: error: ld returned 1 exit status

Open in new window

0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 39862886
'gcc' needs to link with the TCL library as well as it seems. If you have that one, add '-l<tcl_lib_name>' to the command line.

As for Cygwin, '-Wl,' seems a bit odd, try removing the comma and make it '-Wl' (or add the respective argument if there is one)
1
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:jgdvishnu
ID: 39863589
how(what are the steps) do we link gcc to TCL Library

currently the command is

$ gcc -shared example.o  example_wrap.o -o example.dll

Open in new window

and output is
example_wrap.o:example_wrap.c:(.text+0x91b): undefined reference to `_imp__Tcl_ResetResult'
example_wrap.o:example_wrap.c:(.text+0x92f): undefined reference to `_imp__Tcl_SetObjResult'
example_wrap.o:example_wrap.c:(.text+0x953): undefined reference to `_imp__Tcl_SetErrorCode'
example_wrap.o:example_wrap.c:(.text+0x968): undefined reference to `_imp__Tcl_ResetResult'
example_wrap.o:example_wrap.c:(.text+0x98c): undefined reference to `_imp__Tcl_SetErrorCode'
example_wrap.o:example_wrap.c:(.text+0x9b7): undefined reference to `_imp__Tcl_AppendResult'
example_wrap.o:example_wrap.c:(.text+0x9d4): undefined reference to `_imp__Tcl_NewStringObj'
example_wrap.o:example_wrap.c:(.text+0x9fc): undefined reference to `_imp__Tcl_ObjSetVar2'
example_wrap.o:example_wrap.c:(.text+0xa88): undefined reference to `_imp__Tcl_InitHashTable'
example_wrap.o:example_wrap.c:(.text+0xb32): undefined reference to `_imp__Tcl_DeleteHashEntry'
example_wrap.o:example_wrap.c:(.text+0xbb1): undefined reference to `_imp__Tcl_VarEval'
example_wrap.o:example_wrap.c:(.text+0xbc2): undefined reference to `_imp__Tcl_GetObjResult'
example_wrap.o:example_wrap.c:(.text+0xbda): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0xbee): undefined reference to `_imp__Tcl_ResetResult'
example_wrap.o:example_wrap.c:(.text+0xc1c): undefined reference to `_imp__Tcl_VarEval'
example_wrap.o:example_wrap.c:(.text+0xc2f): undefined reference to `_imp__Tcl_ResetResult'
example_wrap.o:example_wrap.c:(.text+0xc46): undefined reference to `_imp__Tcl_ResetResult'
example_wrap.o:example_wrap.c:(.text+0xc5d): undefined reference to `_imp__Tcl_GetObjResult'
example_wrap.o:example_wrap.c:(.text+0xc6f): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0xd5d): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0xdf3): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0xef9): undefined reference to `_imp__Tcl_NewStringObj'
example_wrap.o:example_wrap.c:(.text+0xf8f): undefined reference to `_imp__Tcl_NewStringObj'
example_wrap.o:example_wrap.c:(.text+0xfc2): undefined reference to `_imp__Tcl_GetVar'
example_wrap.o:example_wrap.c:(.text+0x1040): undefined reference to `_imp__Tcl_SetVar'
example_wrap.o:example_wrap.c:(.text+0x10bc): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x110f): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1133): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x11e0): undefined reference to `_imp__Tcl_DeleteCommandFromToken'
example_wrap.o:example_wrap.c:(.text+0x13f8): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x143e): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1462): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x151c): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x1561): undefined reference to `_imp__Tcl_DuplicateObj'
example_wrap.o:example_wrap.c:(.text+0x1572): undefined reference to `_imp__Tcl_SetObjResult'
example_wrap.o:example_wrap.c:(.text+0x15c6): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x15e5): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x162d): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1666): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x174f): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x17bc): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x17fa): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1821): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1851): undefined reference to `_imp__Tcl_GetStringResult'
example_wrap.o:example_wrap.c:(.text+0x18ea): undefined reference to `_imp__Tcl_AppendElement'
example_wrap.o:example_wrap.c:(.text+0x1988): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x19a6): undefined reference to `_imp__Tcl_GetCommandInfo'
example_wrap.o:example_wrap.c:(.text+0x19d0): undefined reference to `_imp__Tcl_DuplicateObj'
example_wrap.o:example_wrap.c:(.text+0x1a14): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1a3c): undefined reference to `_imp__Tcl_CreateObjCommand'
example_wrap.o:example_wrap.c:(.text+0x1abf): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1af6): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1b7e): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1c0b): undefined reference to `_imp__Tcl_GetObjResult'
example_wrap.o:example_wrap.c:(.text+0x1c15): undefined reference to `_imp__Tcl_DuplicateObj'
example_wrap.o:example_wrap.c:(.text+0x1c33): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1c70): undefined reference to `_imp__Tcl_DuplicateObj'
example_wrap.o:example_wrap.c:(.text+0x1c8e): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1cb0): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1cd7): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1d3b): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x1dc0): undefined reference to `_imp__Tcl_CreateObjCommand'
example_wrap.o:example_wrap.c:(.text+0x1e3c): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x1e9e): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x1f18): undefined reference to `_imp__Tcl_GetLongFromObj'
example_wrap.o:example_wrap.c:(.text+0x1fc1): undefined reference to `_imp__Tcl_GetDoubleFromObj'
example_wrap.o:example_wrap.c:(.text+0x2043): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x2066): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x2082): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x2145): undefined reference to `_imp__Tcl_SetResult'
example_wrap.o:example_wrap.c:(.text+0x21d8): undefined reference to `_imp__Tcl_AppendResult'
example_wrap.o:example_wrap.c:(.text+0x2201): undefined reference to `_imp__Tcl_GetDoubleFromObj'
example_wrap.o:example_wrap.c:(.text+0x2243): undefined reference to `_imp__Tcl_GetLongFromObj'
example_wrap.o:example_wrap.c:(.text+0x22b1): undefined reference to `_imp__Tcl_NewIntObj'
example_wrap.o:example_wrap.c:(.text+0x22e9): undefined reference to `_imp__Tcl_NewStringObj'
example_wrap.o:example_wrap.c:(.text+0x233e): undefined reference to `_imp__Tcl_NewDoubleObj'
example_wrap.o:example_wrap.c:(.text+0x235c): undefined reference to `_imp__Tcl_GetStringFromObj'
example_wrap.o:example_wrap.c:(.text+0x2382): undefined reference to `_imp__Tcl_SetVar2'
example_wrap.o:example_wrap.c:(.text+0x23ab): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x23db): undefined reference to `_imp__Tcl_NewStringObj'
example_wrap.o:example_wrap.c:(.text+0x2401): undefined reference to `_imp__Tcl_ObjGetVar2'
example_wrap.o:example_wrap.c:(.text+0x242d): undefined reference to `_imp__TclFreeObj'
example_wrap.o:example_wrap.c:(.text+0x2567): undefined reference to `_imp__Tcl_SetObjResult'
example_wrap.o:example_wrap.c:(.text+0x26b4): undefined reference to `_imp__Tcl_SetObjResult'
example_wrap.o:example_wrap.c:(.text+0x2721): undefined reference to `_imp__Tcl_SetObjResult'
example_wrap.o:example_wrap.c:(.text+0x2a7d): undefined reference to `_imp__Tcl_InitHashTable'
example_wrap.o:example_wrap.c:(.text+0x2bd8): undefined reference to `_imp__Tcl_InitHashTable'
example_wrap.o:example_wrap.c:(.text+0x2c72): undefined reference to `_imp__Tcl_PkgProvide'
example_wrap.o:example_wrap.c:(.text+0x2ce7): undefined reference to `_imp__Tcl_CreateObjCommand'
example_wrap.o:example_wrap.c:(.text+0x2d3c): undefined reference to `_imp__Tcl_SetVar'
example_wrap.o:example_wrap.c:(.text+0x2d86): undefined reference to `_imp__Tcl_TraceVar'
example_wrap.o:example_wrap.c:(.text+0x2dd0): undefined reference to `_imp__Tcl_TraceVar'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: example_wrap.o: bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status

Open in new window

0
 

Author Comment

by:jgdvishnu
ID: 39865746
The TCL library was not needed. The solution was resolved by rewriting the code again.
The steps to fix the JNI issue in the SWIG link

C:\swigwin-2.0.11>swig -java Test.i

C:\swigwin-2.0.11>gcc -c Test.c Test_wrap.c -I/C:/Installation/Java6/include -I/C:/Installation/Java6/include/win32

C:\swigwin-2.0.11>gcc -shared Test.o  Test_wrap.o -o Test.dll

Open in new window

0
 

Author Comment

by:jgdvishnu
ID: 39865753
I've requested that this question be closed as follows:

Accepted answer: 0 points for jgdvishnu's comment #a39865746

for the following reason:

The JKR solution worked
0
 

Author Closing Comment

by:jgdvishnu
ID: 39865754
excellent hint
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now