Solved

generate DLL using cygwin or MinGW

Posted on 2014-02-15
7
1,091 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
Comment Utility
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
Comment Utility
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
Comment Utility
'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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:jgdvishnu
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
excellent hint
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

744 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

15 Experts available now in Live!

Get 1:1 Help Now